Struggling trying to use Exiftool for Google Takeout

Started by Stemondo, November 05, 2022, 06:45:46 PM

Previous topic - Next topic

Stemondo

Hi, I have spent 2 days trying to figure out how to use Exiftool to fix the metadata issue with a google takeout export. I have read the guide for dummies and all the instructions but still not sure what I am doing. I have also found many guides on the script I should be using but because I don't know how to use exiftool it doesn't really help.

I have downloaded the standalone .exe on my windows 11
Renamed the .exe to exiftool and moved it to C:/Windows

I have then found this script to use from here https://legault.me/post/correctly-migrate-away-from-google-photos-to-icloud:

exiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" -ext "*" -overwrite_original -progress --ext json <DirToProcess>

My photos are at this location:
"C:\Users\ste\Downloads\Google Photos"

So I change the script to:

exiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" -ext "*" -overwrite_original -progress --ext json <C:\Users\ste\Downloads\Google Photos>

I open command prompt, copy the script and it says:
The syntax of the command is incorrect.

I've also tried to follow the guide on this forum here:
https://exiftool.org/forum/index.php?topic=12361.0

By using script:
exiftool -d "%s" -tagsfromfile %d%f.%e.json "-DateTimeOriginal<PhotoTakenTimeTimestamp" "-FileCreateDate<PhotoTakenTimeTimestamp" "-FileModifyDate<PhotoTakenTimeTimestamp" -overwrite_original -ext mp4 -ext jpg -r .

But it doesn't seem to let me specify where my photos are, when i ran it it started going through my whole computer with all kinds of results so I stopped it as I was a little worried what it was doing.

I'm guessing I am doing something fundamentally wrong as I don't really understand exiftool.

Could someone point me in the right direction

Thank you
Steve

Phil Harvey

Hi Steve,

Quoteexiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" -ext "*" -overwrite_original -progress --ext json <C:\Users\ste\Downloads\Google Photos>

Was this an exact cut-and-paste of your command?  if so, you need to drop the "<>" around the directory name and use quotes instead, like this:

exiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" -ext "*" -overwrite_original -progress --ext json "C:\Users\ste\Downloads\Google Photos"

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

Stemondo

Thank you Phil, that's fixed it. Hopefully this may help others in the future!