Wildcards recursive

Started by mike1950r, January 12, 2022, 12:36:03 PM

Previous topic - Next topic

mike1950r

Hi,

just one question:

exiftool handles well wildcards for getting infos of files.
is there a tag to do this recursively, say scan thru the subfolders for wildcards?

Thanks for information.

Cheers mike

Phil Harvey

Hi Mike,

The best way to filter filenames in subfolders is the -ext option.

But if you can't filter on extension, then the -if option is the only alternative.  This allows you to use a full perl regular expression.  If most of the files will fail the condition, then -if5 will speed things up a lot. 

exiftool -if5 "$filename =~ /SOME_REGEX/" -r DIR ...

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

mike1950r

Thank you very much, Phil.

This works really great and extremely fast.
Very powerful tool.

Cheers mike