Is it possible write to only specific files?

Started by curtistealer, April 23, 2022, 02:03:05 AM

Previous topic - Next topic

curtistealer

I am trying to write to only files that "source" tag is empty.
I could run this with
-if not $source command.

But there are more than 200000 files to check so I would like to inspect them first and then write to file.txt

I am wondering is it possible to write files from the listfile.txt

exiftool -source="img_0023" to files from listfile.txt

StarGeek

You would use the -@ (Argfile) option to read a text file list.  For example, you could use find (if you're on linux/Mac) to generate a list and pass that to exiftool

Example:C:\>type temp.txt
y:\!temp\Test3.jpg
y:\!temp\Test4.jpg
C:\>exiftool -P -overwrite_original -progress -@ temp.txt -All= -Description=TestText
======== y:/!temp/Test3.jpg [1/2]
======== y:/!temp/Test4.jpg [2/2]
    2 image files updated

C:\>exiftool -G1 -a -s -Description -@ temp.txt
======== y:/!temp/Test3.jpg
[XMP-dc]        Description                     : TestText
======== y:/!temp/Test4.jpg
[XMP-dc]        Description                     : TestText


See this post for an example of directly passing the output of find to exiftool without using a temp file.
* 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).