Hello All,
New here and new to the tool so please bare with me. I have been learning the tool and really appreciate what it will do for our organization. However I have ran into a few snags and could use some help. My goal is to identify bloated DocumentAncestorData, export the results to a file. Once the files have been identified I am them wiping the AncestorData. So far so good.
Everything was going fine running the tool from a Windows Server until I ran into an "Out of Memory" error. I am guessing that there is just too much AncestorData in one of the files for the tool to read. So I thought I would try my luck running the same command (modified for MacOS) from a Macbook. I get two completely different results. Please see the commands and results below. I have removed the -q and -m switches to hopefully find any errors along the way. Note that on Windows I can output a CSV file which properly identifies bloated files, on Mac the file is created but empty.
MacOS
exiftool -p "$directory/$filename" -r -if "$documentancestors and (()=$documentancestors =~ /, /g) > 100" "/Volumes/Users/Frank/test" > /Users/portfolio/Desktop/test.csv
1 directories scanned
4 files failed condition
0 image files read
Windows
exiftool.exe -p "$directory/$filename" -r -if "$documentancestors and (()=$documentancestors =~ /, /g) > 100" "\\Server\Users\Frank\test" > c:\temp\franktest2.csv
Warning: [Minor] Extracted only 1000 photoshop:DocumentAncestors items. Ignore minor errors to extract all - //Server/Users/Frank/test/Figure-350x350.psd
Warning: [Minor] Extracted only 1000 photoshop:DocumentAncestors items. Ignore minor errors to extract all - //Server/Users/Frank/test/Figure-990x180.psd
Warning: [Minor] Extracted only 1000 photoshop:DocumentAncestors items. Ignore minor errors to extract all - //Server/Users/Frank/test/Figure-ContestMain.psd
Warning: [Minor] Extracted only 1000 photoshop:DocumentAncestors items. Ignore minor errors to extract all - //Server/Users/Frank/test/Figure-Twitter700x700.psd
1 directories scanned
4 image files read
On Mac/Linux/Windows PS, you must swap single/double quotes in order to prevent the shell from interpreting the dollar sign as the start of a shell variable instead of a exiftool tag name. So use this instead
exiftool -p '$directory/$filename' -r -if '$documentancestors and (()=$documentancestors =~ /, /g) > 100' '/Volumes/Users/Frank/test' >/Users/portfolio/Desktop/test.csv
Also, as an alternative on Windows, you can try Oliver Betz alternative Windows Exiftool (https://oliverbetz.de/pages/Artikel/ExifTool-for-Windows) or you could use the pure Perl code if you have Perl installed. Both have less memory problems than the normal Windows executable.
Well what do you know, it worked!!!! Also no Out of Memory errors.
Thank you so much for your help, much appreciated!
Regards
Jon