Move jpgfiles with geotag information to another location

Started by raket4u, September 19, 2023, 01:09:47 PM

Previous topic - Next topic

raket4u

Hi
I have thousands of pictures organized in several folders. Some of the pictures does not have geotag information.
I want to move thes pictures to another location but with the same folder structure.
Fx from h:/photos/2022 to h:/photos_without_geo/2022 - including subfolders.
Is this possible with at simple exiftool call?
Yours Jan Ø

Phil Harvey

Hi Jan,

Try this:

1. "cd" to the base directory with the files

cd h:\photos\2022

2. Run this exiftool command:

exiftool "-directory=h:/photos_without_geo/2022/%d" -if "not $gpslatitude" -ext jpg .

Here I have added -ext jpg to only move JPG 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 ($).

raket4u

Hi Phil
Thank you so much for answer!

I worked, but it created a folder "d".

H:\photos_witout_geo\d\
That's not what i wanted.
Can i just omit the %d ?

raket4u


Phil Harvey

This should work unless you are running it from within a .bat file in which case you need to use %%d instead of %d.  %d represents the directory name of the original file, but the percent is a special character in a batch file so it needs to be doubled.

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