Folder comparison: filter to ignore file extension (i.e. only compare file name)

Hello folks,

Here is the problem I am trying to solve:

  1. I back up photos from my camera to my computer. I bring over both JPG and RAW versions of each photo.
  2. I review the photos by looking at the JPG files, and delete the ones I don’t care about
  3. Problem: I now have to manually find the corresponding RAW files and delete them

It’d be handy to use Meld to compare the two folders I have my files in (one for JPGs and one for RAWs), and highlight the files that I need to remove. To do this, I need to have Meld ignore the file extension, and only look at the name.

As far as I can tell, there is no way to do this. But I might be wrong. Therefore, I thought I’d ask for a little help. :grin:

Push come to shove, I can write a Python or Bash script to handle this for me. But I’d rather not reinvent the wheel. :smile:

Cheers!

There’s no way to do this in Meld as it stands.

If you’re willing to mess with the source, there is a class called CanonicalListing in dirdiff.py that is used to normalise filenames (lower-casing, canonical unicode decomposition) and I think that you could probably strip file extensions there and this might just work. I don’t feel that this is a common enough use case to include in Meld itself, but the code change would probably reasonable simple if you wanted to try.

Thanks for the pointer. I’ll see if it’s worth the trouble, otherwise I’ll just write a script that handles the task for me.

Cheers!