ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: horshack on April 18, 2021, 05:54:08 PM

Title: glob support for non-Windows platforms?
Post by: horshack on April 18, 2021, 05:54:08 PM
I noticed exiftool only enables glob support (filename wildcard expansion) on Windows, even though the code supports it on other platforms and works if I set the $doGlob to 1 in the source. Is there a historical reason it's not enabled for other platforms? It would be useful when processing a large volume of files that would otherwise exceed ARG_MAX. For example, on OSX ARG_MAX is 262144. That seems large but it's only a few thousand files for moderately-sized path names when relying on the shell to do the globbing.
Title: Re: glob support for non-Windows platforms?
Post by: Phil Harvey on April 18, 2021, 08:36:47 PM
ExifTool only does globbing on platforms where the shell doesn't perform this function (ie. Windows).

I think it could be very confusing to do it on other platforms. (eg. How then would you specify a file name containing a "*"?)

- Phil
Title: Re: glob support for non-Windows platforms?
Post by: horshack on April 18, 2021, 08:54:45 PM
Quote from: Phil Harvey on April 18, 2021, 08:36:47 PM
ExifTool only does globbing on platforms where the shell doesn't perform this function (ie. Windows).

I think it could be very confusing to do it on other platforms. (eg. How then would you specify a file name containing a "*"?)

- Phil

Thanks Phil. I was thinking the globbing would be optional, like the --include and --exclude options of grep. Or perhaps just an option to toggle globbing on.