Copy & auto-rename only if different

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
davlar
Junior Member
Junior Member
Posts: 5
Joined: 2017-11-07, 15:03 UTC

Copy & auto-rename only if different

Post by *davlar »

Hello, first let me thank you for the best software of this type I've ever seen!

(BTW, I've bought a license.)

However, I stumbled upon a problem -- there is something TC cannot do. I often have to merge files from multiple folders into a single folder. I have to search the folders and copy the files from the search result list. There are hundreds of duplicate files, having the same name, but one or more of the files have actually different content (only the same name).

What I need to be able to do is if TC is copying files from a search result list to a destination, and the destination already contains a file with the same name, and asks me how to resolve that conflict, then there should be a function Copy & auto-rename only if content different.

If that function was used, TC would first compare the content of both files with the same name, and if their contents are the same, it would not copy the file (if the contents are different, it would copy and auto-rename the file being copied).

I hope it all makes sense. I can explain further if needed.

Thanks! [/b]
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This would actually be quite slow, especially with many files with the same name and different content - TC would have to compare each copied file with all the copies which are already present.

It would be faster to just copy all files with auto-rename, and then use the duplicate file finder to remove the duplicates. This is faster because the duplicate file finder uses file checksums when there are more than 2 files with the same size.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

davlar,
What if the names are different but the content is the same?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
davlar
Junior Member
Junior Member
Posts: 5
Joined: 2017-11-07, 15:03 UTC

Post by *davlar »

ghisler(Author) wrote:It would be faster to just copy all files with auto-rename, and then use the duplicate file finder to remove the duplicates. This is faster because the duplicate file finder uses file checksums when there are more than 2 files with the same size.
I agree that that would be faster. I was aware of the function to find duplicates.

However, I may be missing something, I used the Search function to find duplicates, then Feed to Listbox but then there was no straightforward automated function to delete only the duplicates while keeping one of the files.

How do I do that? Ideally there should be some regex or heuristics to determine which kind of filename is to keep and which are to delete.

But TC seemed to expect me to manually choose all duplicates and then delete them. But that's impossible with thousands of files that have one or more duplicates.

Consider this example:

You find 3 duplicate files:
text.txt
text(2).txt
text(3).txt

I would like to be able to tell TC to automatically delete all such duplicates except the one with the shortest name (text.txt) but only if their contents are the same.

But in the current version, how can I have TC automatically delete all found duplicates?
davlar
Junior Member
Junior Member
Posts: 5
Joined: 2017-11-07, 15:03 UTC

Post by *davlar »

Hacker wrote:davlar,
What if the names are different but the content is the same?

Roman
The function I suggested would apply only to files with the same name and content (that's why the name of the function says "auto-rename").
davlar
Junior Member
Junior Member
Posts: 5
Joined: 2017-11-07, 15:03 UTC

Post by *davlar »

Ok sorry I've now upgraded to 64-bit v9.10 and found out that it has new Select Duplicate Files (Num+) dialog that does what I needed. Great! Thanks and sorry for not trying the latest version before posting.

However, I'd like to ask for new options to be added to the section "Leave at least one unselected".
Those option would be:

"Shortest filename"
"Longest filename"
"Filename without brackets"


The reason being that auto-renamed duplicates usually have longer filenames and/or bracketed numbers added to the original names.

Thanks for consideration.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

davlar,
The function I suggested would apply only to files with the same name and content (that's why the name of the function says "auto-rename").
So I assume the answer is "they would be copied normally"?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
davlar
Junior Member
Junior Member
Posts: 5
Joined: 2017-11-07, 15:03 UTC

Post by *davlar »

Hacker wrote:davlar,
The function I suggested would apply only to files with the same name and content (that's why the name of the function says "auto-rename").
So I assume the answer is "they would be copied normally"?

Roman
Yes, you assume correctly.
Post Reply