Find duplicate filenames with different extensions

I am looking for a way to find duplicate filenames with different extensions.

I used to shoot Raw & Jpeg on my camera so that it produced both file types.

They are named such as p12353-01.jpg and p12353-01.dng.

Now that I am using Adobe Lightroom, there is no need to keep a copy of the JPG files. However, my wife shoots only JPG, plus I have thousands of JPEG without a corresponding RAW file, so I cannot simply delete the JPG files from the directory structure. I thought about using a flat file view and sorting by filename and looking for duplicates, but I have about 20,000 files in the directory structure and it is WAY too tedious. Any ideas?

I've got one foot out the door now as I head back to work but the following button commands might get you started.

@nodeselect dopusrt /cmd Select PATTERN "{file$|noext}.*"

Go into Flat View in the folder, then Select All, then click this button:

(See here for what to do with the button XML.)

<?xml version="1.0"?> <button backcol="none" display="both" textcol="none"> <label>Select Duplicate JPEGs</label> <icon1>#default:selectwild</icon1> <function type="normal"> <instruction>@nodeselect</instruction> <instruction>@nofilenamequoting</instruction> <instruction>Select PATTERN=&quot;*.jpg&quot; DESELECT</instruction> <instruction>Select PATTERN=&quot;{file|noext}.*&quot;</instruction> <instruction>Select PATTERN=&quot;~(*.jpg)&quot; DESELECT</instruction> </function> </button>

You should then be left with just the .JPG files which have the same name as other files.

(It doesn't check that the other files are .DNG, so if that's important the button will need to be modified slightly.)

[quote="leo"]Go into Flat View in the folder, then Select All, then click this button:

You should then be left with just the .JPG files which have the same name as other files.

(It doesn't check that the other files are .DNG, so if that's important the button will need to be modified slightly.)[/quote]

Very close, but it is only selecting the first .jpg in the list. I'll play with it...

[quote="TriadX"][quote="leo"]Go into Flat View in the folder, then Select All, then click this button:

Very close, but it is only selecting the first .jpg in the list. I'll play with it...[/quote][/quote]

I think what is messing it up is there is also an .orf file and a .xmp file in the same folder I am testing it on. So I have something like this:

P6031361.dng
P6031361.jpg
P6031361.ORF
P6031361.xmp
P6031362.dng
P6031362.jpg
P6031362.ORF
P6031362.xmp
P6031363.ORF
P6031363.xmp
P6031364.dng
P6031364.jpg
P6031364.ORF
P6031364.xmp

When I am done I'd like to have only the dng files. The key is that it should only delete orf, jpg and xmp if a dng exists.

Oops, that was silly of me. Exactly the same problem as in another thread I just replied to. The button below should work, and it also is changed to select all the other extensions.

It selects *.DNG (and nothing else), then selects everything else with the same filename and any extension, then deselects the *.DNG files leaving you with just the extra ones.

<?xml version="1.0"?> <button backcol="none" display="both" textcol="none"> <label>Select Duplicates of DNG files</label> <icon1>#default:selectwild</icon1> <function type="normal"> <instruction>@nodeselect</instruction> <instruction>@nofilenamequoting</instruction> <instruction>Select PATTERN=&quot;*.dng&quot; DESELECTNOMATCH</instruction> <instruction>@sync:dopusrt /cmd Select PATTERN=&quot;{file|noext}.*&quot;</instruction> <instruction>@sync:dopusrt /cmd Select PATTERN=&quot;*.DNG&quot; DESELECT</instruction> </function> </button>

Thanks Leo!!! PERFECT!!!! This will save me SO much time. I love Opus. :smiley: