Image-ExifTool - Rename using path's last dirname as prefix

Posted on Mon Feb 5 21:06:30 2007 by pdi
Rename using path's last dirname as prefix

I've been trying to sort this one out without much success and its likely I'm missing something. I'd appreciate any help.

There are some photos in a directory C:\path\to\dirname. Is there any way to rename the photos using as prefix the name of the last directory in the path? The filenames will be of the form DIRNAME_rest_of_filename.ext. Using the command below was not successful:

exiftool "-filename=%d_%2c.%e" dirname

Many thanks in advance.

pdi

Direct Responses: 4244 | Write a response