All photos with no gps data

Started by linuxuser, February 05, 2012, 09:27:22 AM

Previous topic - Next topic

linuxuser

I am using Linux and want to find all photos with no gps data (exactly all photalbums with at least 1 photo with no gps data)

Is there a simply way with exiftool?

Phil Harvey

#1
This may do what you want:

exiftool -p '$directory/$filename' -if 'not $gpslatitude' -r DIR

This command will print the path names of all images without EXIF GPS information in directory DIR and its subdirectories.

- Phil

Edit: changed $gpsversionid to $gpslatitude because some cameras write empty GPS information containing only GPSVersionID.
...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 ($).

linuxuser

Thanks,

I think


exiftool -p '$directory' -if 'not $gpslatitude' -r DIR | sort -u


does what I want, but I want to limit the search. I want to search for *.jpg only and e.g not for *.jpeg
A limitation to the maximum number of subdirectories could be also helpful

Phil Harvey

Add -ext jpg to search for only .jpg and .JPG files.  There is no way to limit the depth.

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

linuxuser

Thanks a lot. I solved it by using a pipe with cut.