Page 1 of 1

Copy & auto-rename only if different

Posted: 2017-11-07, 15:12 UTC
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]

Posted: 2017-11-07, 21:09 UTC
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.

Posted: 2017-11-08, 00:47 UTC
by Hacker
davlar,
What if the names are different but the content is the same?

Roman

Posted: 2017-11-08, 17:11 UTC
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?

Posted: 2017-11-08, 17:22 UTC
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").

Posted: 2017-11-08, 19:28 UTC
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.

Posted: 2017-11-08, 20:53 UTC
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

Posted: 2017-11-10, 17:06 UTC
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.