winmerge icon indicating copy to clipboard operation
winmerge copied to clipboard

Find identical files with different names

Open theozhbl opened this issue 4 years ago • 4 comments

Thank you for providing WinMerge. It's really a very useful piece of software. I'm using it to clean up old directories etc.

One question, about a compare mode which I haven't found yet.

Given situation: I compare 2 folders with identical files but they are renamed in the second folder. An example: In the first folder they have to original name from the digital camera, e.g. IMG_1234.jpg In the second folder they have, e.g. a name like 20210307_110812_Test.jpg

The way I'm currently using WinMerge, WinMerge will tell me that the files are "left only" and "right only". However, they are even identical.

So, what I have in mind if I want to find identical files:

  1. check if there are files with identical file size (only then they possibly could be identical)
  2. if there are files with identical size, have a closer look with a binary comparison
  3. after all, WinMerge will tell me that IMG_1234.jpg in Folder1 and 20210307_110812_Test.jpg in Folder2 are identical.

Thank you for consideration. And please forgive me, if it is already existing and I just haven't found the option for it.

theozhbl avatar Mar 07 '21 10:03 theozhbl

Unfortunately, WinMerge doesn't have the ability to associate a file with a file that has a different filename but the same content.

In the future, I would like to add file renaming, moving, and duplicate file detection functions by hash value calculation such as MD5, but I do not know when.

If you are looking for a file with a different file name but the same content, you can use the following application.

https://dupeguru.voltaicideas.net/

sdottaka avatar Mar 07 '21 12:03 sdottaka

I recently had this same issue. I was comparing directories/files on a drive from one computer to ones on another, which were newer. In my case, the biggest issue was with music files, where I had renamed and, in some cases, moved the files, but they were otherwise identical. While checksum calculation and comparison would be the most ideal for this, and I look forward to its implementation in WinMerge (though possibly with xxHash3 for better performance, since that should be sufficient for this use case), there is another thing that could be done in the short-term to make this situation easier to deal with.

Currently, with multiple such files, the user has to select two of them, compare them, then close the tab and move on to the next pair. There are a couple ways this process could be improved. First, I didn't realize at the time I could hit enter to compare, so I was right-clicking and selecting compare, which took longer. It's hard to say how this could be improved, since you could put "Enter" next to compare in the context menu to show that it's the hotkey for that action, but then one could argue it should be done on all menu items, which would be cluttered. Maybe if compare is selected from the right-click menu, it could pop up and notify the user that enter can be used instead, either as a one-time thing or if the right-click compare is used multiple times.

The second, and bigger, way this process could be improved is by assigning pairs via hotkey, then running a batch compare on them. For example, the user would select two files that should be the same but have different file names, hit the hotkey, and those two files would be added to a variable array as a pair, then another two files would be selected and added, and so on. Once done, a special compare function could be run that would automatically go through and compare all the defined pairs, and show the results in a new tab. This feature could also be designed to allow a group of files to be selected and added as the first list of files, then a second group to be added as a second list, then run a compare of list one against list two, comparing them sequentially. So file1, file2, and file3 could be added all at once, followed by file-1, file-2, and file-3, and then file1 and file-1, being the first in the sets, would be compared, and so on.

vertigo220 avatar May 08 '22 03:05 vertigo220

I look forward to this functionality eventually being included in WinMerge.

Until then, I can recommend the freeware tool SearchMyFiles from Nir Sofer: https://www.nirsoft.net/utils/search_my_files.html

It works well for finding duplicate files. (Don't worry that the screenshot on the linked page does not indicate that functionality... it's just an old screenshot.)

It's only big downside is that the different colours it optionally uses to denote matching groups of files are too similar to be easily discerned (at least for me). It will use similar colours adjacent to each other. Besides this issue, it works very well for me.

Gitoffthelawn avatar May 08 '22 07:05 Gitoffthelawn

The little bit I used that it seemed to work well, but the UI wasn't very well done and seemed a bit rough and unintuitive. I personally prefer dupeguru, what sdottaka recommends above. Either way, they're both fairly good apps IME, so yes, a good option for this kind of work until WinMerge improves in this regard. I just wish I'd thought of that before spending so much time doing it with WinMerge. Oh well. Maybe next time.

FWIW to anyone looking for a tool for this, aside from dupeguru and SearchMyFiles, I tried several others a while back, and the only other ones worth trying IMO are AllDup, which is also free and seems decent, though not quite as good, and Fast Duplicate File Finder, which seems pretty good but is not free. Others I tried that weren't very good were Auslogics, Duplicate Files Finder by Matthias Boehm, Puran Duplicate File Finder, and Funduc Duplicate File Finder. There are, of course, others I didn't try.

vertigo220 avatar May 08 '22 17:05 vertigo220