Warning: Error opening file | .json files in parent folder

Started by Exifthroughthegiftshop, October 21, 2023, 03:07:25 AM

Previous topic - Next topic

Exifthroughthegiftshop

Hi there,

I'm making my first steps with exiftool (and reviving my never been great command line knowledge).

For context:
I have pics (from a google photos cloud takeout), where I'd like to make sure the metadata is correct as I used to edit pics within google photos.

The exiftool batch to update the metadata from the JSON files went through, a lot was changed - though there are also plenty of JSON files that produce the above warning that they can't be opened.

I guess it's not due to the command used as it worked with most files, but here's the comand I used after back and fourth and researching the vast forums here:

D:\exiftool-12.67\exiftool -r -ext jpg -tagsfromfile %d%f.%e.json -description "-gpslatitude<geodatalatitude" "-gpslatituderef<geodatalatitude" "-gpslongitude<geodatalongitude" "-gpslongituderef<geodatalongitude" "-gpsaltitude<geodataaltitude" "-createdate<creationdatetimestamp" "-datetimeoriginal<phototakentimetimestamp" "-modifydate<modificationtimetimestamp" -d %s D:\Takeout
The warning message references the path where the jpg files are located for the json files, though
the .json files are in the parent folder of the pics - which seems to be the reason.

Would there be a way to get it to work without having to sort the json files in the (many) subfolders with their corresponding jpg files?

Thanks a lot!

Phil Harvey

Replace %d with %-:1d if the .json files are in the parent directory of JPEG images.  The -:1 moves up one directory level in the hierarchy.

This feature is explained in the "Advanced features" section of the -w option documentation.

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