Assstance renamining images

Started by Arb, April 30, 2014, 03:30:04 PM

Previous topic - Next topic

Arb

Hello,

I have been struggling exporting all of the information that I would like and was hoping you would be able to help me out.  Thanks in advance!

I want to export the file name, creation date, and if possible part of the directory path into a csv doccument. I have figured out how to get the name and date using a custom fmt file:

#[HEAD]FileName,CreateDate,
# End of Header
$filename,$createdate,
#[TAIL]


exiftool -ext .jpg -f -p my.fmt C:\ExifTools\Folder\test > Photo.csv

Is it possible to create a column with the image directory? Or even better better,  a part of the directory i.e. "Folder"?

Alternatively if the first option isn't feasible, I would like to rename the images to "Folder_OriginalFileName.jpg." But so far have been unable to figure out how to accomplish either of these.

Thanks again!

Phil Harvey

Either is possible.  You can add "$directory" to your format file for the directory name, or using the advanced formatting feature you can extract any part of the directory name that you want.  For example, someting like this may extract "Folder" from your example:

${directory;s(.*/([^/]+)/.*)($1)}

- 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 ($).