Being a code performance enthusiast, something that bothers me is that every tag for every file is generated to console. I know I can use -p '' to suppress most of that output, but it still seems like the generation would bog down the run duration.
Adding in -s3 seems to speed things up by a ~100ms, but it seems the tags generation are still impacting it.
In the end I just wanted '# of files failed match' and '# of files matched'. I have been looking around but can't figure it out.
exiftool.exe -charset UTF8 -if "defined $ExampleField" -fast2 -s "<filenames>"
Thank you for the help everyone
Quote from: QGtKMlLz on August 29, 2023, 04:06:16 PMBeing a code performance enthusiast, something that bothers me is that every tag for every file is generated to console. I know I can use -p '' to suppress most of that output, but it still seems like the generation would bog down the run duration.
See the
-TAG option (https://exiftool.org/exiftool_pod.html#Tag-operations) as well as Reading Examples (https://exiftool.org/exiftool_pod.html#READING-EXAMPLES). List only the tags you want to see and that is all exiftool will display.
QuoteIn the end I just wanted '# of files failed match' and '# of files matched'. I have been looking around but can't figure it out.
exiftool -if '$TAG' -Filename /path/to/files/Example
C:\>exiftool -G1 -a -s -if "$DateTimeOriginal" -Filename Y:\!temp\aa
======== Y:/!temp/aa/photo1.jpg
[System] FileName : photo1.jpg
======== Y:/!temp/aa/photo3.jpg
[System] FileName : photo3.jpg
======== Y:/!temp/aa/photo5.jpg
[System] FileName : photo5.jpg
======== Y:/!temp/aa/photo7.jpg
[System] FileName : photo7.jpg
======== Y:/!temp/aa/photo9.jpg
[System] FileName : photo9.jpg
1 directories scanned
4 files failed condition
5 image files read
Or to reduce the output further, ask for the name of a tag that doesn't exist. Either way, all you need is to just parse the last few lines
C:\>exiftool -G1 -a -s -if "$DateTimeOriginal" -FakeTag Y:\!temp\aa
======== Y:/!temp/aa/photo1.jpg
======== Y:/!temp/aa/photo3.jpg
======== Y:/!temp/aa/photo5.jpg
======== Y:/!temp/aa/photo7.jpg
======== Y:/!temp/aa/photo9.jpg
1 directories scanned
4 files failed condition
5 image files read
I see the problem with my -p ' ' now, with the new way I am doing it; it causes my powershell Diagnostics.Process entry method to be cleared before it is displayed to console (not a functional problem, but makes it hard with troubleshooting).
If I change -Tag to my field, -ExampleField , that does help by removing the QuickTime Minor errors, but it keeps '# failed' (better than -m, which would have also remove '# failed').
I just wish it did not display the: =========<file paths>
Quote from: QGtKMlLz on August 30, 2023, 04:23:18 PMI just wish it did not display the: =========<file paths>
I see no way around this if you want the summary messages.
- Phil