Speed up certain "-if" conditions

Started by karlgustavv, October 30, 2014, 06:33:28 AM

Previous topic - Next topic

karlgustavv

Hi Phil,

ExifTool is great if you want to correct tags that other software messed up.

These other programs change "FileModifyDate" of processed files and I want to handle only those files with exiftool that have been changed since a specific date:

For testing purposes I just run this command:
exiftool -if "$FileModifyDate ge '2014:10:29'" -filename -r Folder

That works great. ExifTool outputs all files that have been changed since 2014-10-29. But it is horrible slow. It reads (parts) of all pictures. That would be correct if you want to filter according to e.g. "DateTimeOriginal" but for "FileModifyDate" it does not seem necessary.

Best Regards
Karl


Phil Harvey

Hi Karl

The only thing you can do is to add the -fast2 option, which may help a bit if you are reading image files.

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

karlgustavv

Thank you for that fast answer.

My workaround will be to copy all changed files to a temporary directory, process them with ExifTool there and copy them back afterwards.

robocopy Folder TempFolder *.jpg /MAXAGE:2 /S ...

Regards
Karl

Phil Harvey

Hi Karl,

I have just added a -fast3 option that should really help you here.

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