conditionnal renaming files (with no gps info)

Started by sevy, April 14, 2019, 11:21:10 AM

Previous topic - Next topic

sevy

Hello,

I know how to rename files according creation date, I learn how to find pictures with no gps info but how to rename pictures with no gps info ?
I'm trying to get this result : if the picture "filename.jpg" does not contain gps info, it should renamed as "filename_NOGPS.jpg"

I guess this operation should be possible with Exiftool but impossible to find the way.

thanks in advance for your help,

sevy

StarGeek

#1
Try
exiftool -if "not $GPSLatitude" "-FileName=%f_NOGPS.%e"

In this example, if there is no latitude data, it's quite unlikely that there is any other useful GPS data.  The GPSVersionID tag might exist, as a lot of cameras will embed that even when no other GPS data is added.

edit: Fixed error
* 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).

sevy

hello,

Thanks for the quick reply !
I tried your suggestion with test-files but I got an error message :
Warning: No writable tags set from ./FILENAME.JPG
Warning: Invalid tag name '%f_nogps.%e' - ./FILENAME.JPG

Files with no gps have been correctly identified but not modified.

I forgot to write I'm working with Win10 and the last version of ExifTool (11.35)

Hayo Baan

Hayo Baan – Photography
Web: www.hayobaan.nl

StarGeek

And there I go getting bitten by the < vs = difference again :D

Funny thing is I started off correctly, then started to do a different version using $FileName, then decided to revert to the simplest form and expand later if needed, but forgot to fix that part.
* 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).

Hayo Baan

Quote from: StarGeek on April 14, 2019, 02:23:45 PM
And there I go getting bitten by the < vs = difference again :D

Funny thing is I started off correctly, then started to do a different version using $FileName, then decided to revert to the simplest form and expand later if needed, but forgot to fix that part.

Ha yes, that one still bites me sometimes as well. It took me a while before I saw the problem. In fact I had to run the command myself to see what could have been wrong ;)
Hayo Baan – Photography
Web: www.hayobaan.nl

sevy

Hello,

thanks a lot  / hartelijk bedankt to StarGeek and Hayo : it's working perfectly !