Find corresponding .nef (camera raw file) file for jpg

Hi all,
I take alot of pictures in both jpg and raw format. That means the image files have the same name but different extension: .ned and .jpeg.

I have been asked to edit alot of pictures but I have been submitted the jpeg files in a folder instead of the corresponding raw file that I need to edit. The raw file is stored in a different folder with subfolders and I am trying to find a way to loop through the jpef folder and find all the corresponding nef files so that i can copy those to a work folder and edit them.
Any suggestions?
Thanks in advance

A script could do this, but it'd be more than a few lines of code. We can write it for you if you link your account.

Fantastic! I've linked my account now!

Thank you!

I was going to write this this afternoon, but we had a power cut here. I'll see what I can do over the next few days. A script to do this could make quite a good tutorial.

That would be great!
I can see a couple scenarioes where such a script could be useful.

Let me know if you need a more detailed description of my usecase!

I really appreciate your help! You saved my harddrive 7 years ago and if you come through you'll save me a lot of work combing through subfolders for the nef file.

Hi!
Have you been able to look into this script yet?

Have you considered the flat view for this? This might work if all the files have a common parent folder.

  • open dual display
  • enable flat view with no folders
  • sort by name

You should now be able to identify all the duplicates by name.
image


Another (better) solution
You can use the duplicate file finder to find all duplicates by filename (no extension). Doing this should result in a list of files that are both a jpg and raw. Again you can then copy the raw files the another folder.

I've started on the script but it's not ready to use yet.

I'm planning to make this into a tutorial on script writing, since it's a good example of several commonly used things in one place, but that also means it may take a bit longer to finish.

Maybe I misunderstood the request. What will the script do that that the duplicate file finder wont do?
If we are just finding files that have the same name with different extension. The Duplicate File Finder will do a nice job of this.

Filename (no extension): This will search for files with the same filename stem, ignoring their file extension. For example, "grandma.mp3" and "grandma.jpg" would match.

Once you run this you can review the results (ensuring that there are no duplicate .ned files). Then use the Filter Bar to show only the *.ned and copy or move them to another folder.

Don't get me wrong, a tutorial script is always helpful and still worth producing.

Select a file, click a button, then the other file will appear next to it.

Ok yes I was off on the wrong path.

I have a button I use to do something similar.

  • In the Source Lister select the file who name you want to search for
  • Set the Destination Lister the to folder you want to search
  • Press the button, and the result will display in a new tab on the destination
<?xml version="1.0"?>
<button backcol="none" display="icon" label_pos="right" textcol="none">
	<label>Find Matching file by name</label>
	<tip>Find Matching file by name no ext</tip>
	<icon1>#searchfield</icon1>
	<function type="normal">
		<instruction>Find {file|noext} IN {destpath} RECURSE SHOWRESULTS dest,tab</instruction>
	</function>
</button>

Here is the script:

My apologies for my late reply, Your script worked great. Thank you very much for your effort and I even learned something from your script!

Thanks! :smile:

1 Like

Hi,

I have a folder with around 15000 to 16000 files. Most of these files will be two copies of a file with different extensions.

I can use the Duplicate File Finder like mentioned above with the Filename (no extension) : This will search for files with the same filename stem, ignoring their file extension. For example, "grandma.mp3" and "grandma.jpg" would match.

There are a few tens or maybe hundred or so files from the 15000 to 16000 which will NOT have another file with same name but different extension.

If I want a list of files from the folder that do NOT have duplicates, how do I find them. Any way to reverse the above duplicate file finder search to show files that do NOT match the duplicate criteria.

Thanking in advance,