Main Menu

Location 2 Filename

Started by wien-al, March 29, 2017, 11:46:02 AM

Previous topic - Next topic

wien-al

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-

Phil Harvey

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

wien-al

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-

StarGeek

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
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

(hey, first real-use test of the new Windows filename validation patch!)
...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 ($).

wien-al

StarGeek  :)

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

-alex-