ExifTool Forum

ExifTool => Newbies => Topic started by: wien-al on March 29, 2017, 11:46:02 AM

Title: Location 2 Filename
Post by: wien-al on March 29, 2017, 11:46:02 AM
Hello!

Maybe someone can help me?

I can reed the Location saved in the jpg with
exiftool.exe -location -s -s -s DSCN1497.JPG

But I like to add it to the Filename
eg. DSCN1497.JPG  --> DSCN1497-Vienna.JPG

Can someone PLEASE help me?

THANK you very much!
-alex-
Title: Re: Location 2 Filename
Post by: Phil Harvey on March 29, 2017, 01:04:43 PM
Hi Alex,

This command may do what you want:

exiftool "-filename<%f-${location}.%e" DIR

To test this out, replace "filename" in the above command with "testname" to be sure it is doing what you want before renaming the files.

- Phil
Title: Re: Location 2 Filename
Post by: wien-al on March 29, 2017, 01:46:29 PM
Hi Phil!

Thank you very much; but I get these Error

Warning: New file name not allowed in Windows (contains reserved characters) - DSCN1334.jpg
    0 image files updated
    1 files weren't updated due to errors

TIA!
-alex-
Title: Re: Location 2 Filename
Post by: StarGeek on March 29, 2017, 02:05:21 PM
What is the location?  Does it contain characters that can't be in a Windows filename such as / | :

Try
exiftool "-filename<%f-${location;}.%e" DIR
Title: Re: Location 2 Filename
Post by: Phil Harvey on March 29, 2017, 02:27:36 PM
(hey, first real-use test of the new Windows filename validation patch!)
Title: Re: Location 2 Filename
Post by: wien-al on March 29, 2017, 05:19:20 PM
StarGeek  :)

THANK YOU SO MUCH!!!! THIS IS WORKING VERY VERY FINE!!!!

-alex-