ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: janutz on April 17, 2010, 09:17:21 AM

Title: date and city in filename
Post by: janutz on April 17, 2010, 09:17:21 AM
At the moment I use this command in a batch file to set the date in the filename of all jpg-files in the directory:
exiftool "-FileName<${CreateDate}_%%f.%%e" -d "%%Y%%m%%d_%%H%%M%%S%%%%-c" *.JPG

Now I want to have also the city of the IPTC tag in the file name in the form date_city_filename.jpg.
Is this possible?

-Jan
Title: Re: date and city in filename
Post by: Phil Harvey on April 18, 2010, 07:40:24 AM
Hi Jan,

Yes.  It is as simple as adding "${city}" to the string you are copying"

exiftool "-FileName<${CreateDate}_${city}_%%f.%%e" -d "%%Y%%m%%d_%%H%%M%%S%%%%-c" *.jpg

- Phil
Title: Re: date and city in filename
Post by: janutz on April 18, 2010, 02:08:18 PM
Hi Phil,

Thank you very much for the quick response.

-Jan