News:

2023-08-10 - ExifTool version 12.65 released

Main Menu

Automation?

Started by suninmoon, April 21, 2023, 06:12:31 PM

Previous topic - Next topic

suninmoon

Hi all

You've all helped me with adding GPS and correcting the dates of my video files and I'm thankful for that. Before I start working on hundreds of files is there a way to automate any of this? Like for example if I had 50 files that had the same GPS location could I somehow correct it on them in one command?

Thanks much

StarGeek

Quote from: suninmoon on April 21, 2023, 06:12:31 PMLike for example if I had 50 files that had the same GPS location could I somehow correct it on them in one command?

If they are all in the same directory, then you can just pass the directory to exiftool.

If you have a text file which lists all the files you want to process, then you can pass that text file with the -@ (Argfile) option, e.g. -@ /path/to/file.txt

It all depends on how you have them set up.  You can mix and match directories and individual file names in a exiftool command, up to the maximum length of the command line.  Under Windows, the max length is about 8,000 characters, but Linux has a length of over 100,000 characters.
* 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).

suninmoon

ok so instead of having the file path at the end I just put the directory and it should apply to everything in there?

Thanks

StarGeek

Everything in that directory but not subdirectories unless you add the -r (-recurse) option.  Also, you can't use wildcards such as *.jpg while recursing, you have to use the -ext (-extension) option, e.g. -ext jpg. See Common Mistake #2.
* 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).

suninmoon

Thank you, that worked great! I was able to update the GPS on 72 files at once. If only there were a way to update the date and time as easily but I guess that would require a script to match the date with the filename.