ExifTool Forum

ExifTool => Newbies => Topic started by: greddin on January 02, 2022, 12:01:37 PM

Title: Appending original filename to end of new name
Post by: greddin on January 02, 2022, 12:01:37 PM
Hi all,

I'm using the following command to rename videos file to the CreateDate. This works well.

exiftool -overwrite_original "-filename<CreateDate" -d %Y-%m-%d_%H%M%S%%-c.%%le -api QuickTimeUTC *.*

But I'd like to preserve the original filename in the newly renamed file. 

For example, if the original filename is GOPR0006.mp4, the new name would be something like: 2019-01-12_094754 GOPR0006.mp4

Is this possible? Thanks.
Title: Re: Appending original filename to end of new name
Post by: StarGeek on January 02, 2022, 12:04:19 PM
Change the -d (-dateFormat) option (https://exiftool.org/exiftool_pod.html#d-FMT--dateFormat) to
-d "%Y-%m-%d_%H%M%S %%f%%-c.%%le"

Quotes will be needed because of the space added before the original filename.
Title: Re: Appending original filename to end of new name
Post by: greddin on January 02, 2022, 12:21:59 PM
Thank you StarGeek!