need help renaming/moving files

Started by piticu, April 08, 2013, 09:21:13 AM

Previous topic - Next topic

piticu

Hi guys. I need a bit of help: i got a folder with a bunch of raw files and i want to rename the files based on the lensid they've been taken with. Can you please give me a hint where to start? Thank you.

If it helps, I only have 3 lenses used:






LensLensID
1. AF-S Nikkor 70-200mm f/2.8G ED VR II162
2. AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED119
3. AF-S Nikkor 70-200mm f/4G ED VR178

And, ideally, i need to get the filenames as follow:

lensid_originalFilename.nef

Phil Harvey

Try this:

exiftool "-filename<$lensid#_$filename" FOLDER_NAME

Here I have used double quotes, which is what you need in Windows, but on Mac/Linux use single quotes instead.  This could also be done a few other ways:

exiftool -n  "-filename<${lensid}_$filename" FOLDER_NAME

exiftool "-filename<$lensid#_%f.%e" FOLDER_NAME

...

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

piticu