adding string during a rename

Started by dudedude, May 20, 2011, 01:10:11 AM

Previous topic - Next topic

dudedude

Hello,

My apologies in advance for any stupidity on my part.

So what I'm trying to do is to do a rename where the file has some additional string.

There are 2 possible names I want to do (I need to do this for .jpg and avi files):
IMG_6694.JPG
to
either
20110408_082751.our_hawaii_vacation.JPG
or
2011.our_hawaii_vacation.20110408_082751.JPG

The example "exiftool "-FileName<CreateDate" -d "%Y%m%d_%H%M%S.%%e" DIR" gets me to:
20110408_082751.JPG but for the life of me I cannot figure how to append the string.

This is probably super-easy...but I don't see how to do it.

Thank you for your help.

Dan

Phil Harvey

Hi Dan,

You can do this with

-d "%Y%m%d_%H%M%S.our_hawii_vacation.%%e"

or if you want to copy the value from another tag:

-d "%Y%m%d_%H%M%S" "-filename<$createdate.$someothertag.$fileextension"

where the FileExtension tag is one of the example Composite user-defined tags in the sample config file.

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

dudedude

Hello Phil,

Got it.

Thanks so much for your help.

Dan