I have two folders of images. In one folder there are .JPGs
, e.g.
- 001.jpg
- 002.jpg
- 003.jpg
- 004.jpg
- 005.jpg
- 006.jpg
- 007.jpg
- 008.jpg
in the other folder, there are .NEF
s. However some of the .NEF
s have been deleted, so there are e.g.
- 001.nef
- 003.nef
- 004.nef
- 005.nef
- 008.nef
The jpgs and nefs correspond to one another – they are the same photograph taken at the same time with the same efix data (saved to two seperate memory cards)
What I want to do is select the .JPGs that correspond to the remaining .NEFs. In the above example I want to select JPGs 1,3,4,5,8 but not the others. I actually have around 400 jpgs and 800 nefs.
I have tried using folder comparison apps such as VisualDiffer however they seem to only work if you're using the same full file name + extension.
Does anybody know how it might be possible to achieve this in finder or using terminal? or alternatively with a different app?
I am using Mac OSX 10.6.8
Thanks!
Best Answer
Open terminal and use cd to make the directory of *.nef files your current directory. Let's assume you have this structure:
mydir/jpegdir mydir/nefdir
So cd into mydir/nefdir
Then:
example below. Note here that I put "echo" in front of the mv command. You want to omit that, but I often use it when I'm checking that a script is doing what I expect before executing it. You also don't say what you want to do with the files, but moving them to a new folder allows you to select them, and you can always move them all back. I also shortened my tmp variable names.