Ignore folders by wildcard?

Started by TT, February 28, 2012, 04:40:41 PM

Previous topic - Next topic

TT

I'm trying to 'ignore' the processing of subfolders that contain a specific character in them, e.g, a "." .  Is there a way to do this?  Similarly, can wildcards be used with the -i switch?

Phil Harvey

Sorry, currently -i does not support wildcards.  Offhand, I can't think of an easy way to do this.

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

TT

After I use Exiftool to create folders and move photos into them, I need a way to use -r while ignoring folders manually renamed from, say, yyyy\yyyy-mm-dd to yyyy\yyyy-mm-dd.vacation.spain . I don't want any folders that don't adhere to the 'default' convention of yyyy\yyyy-mm-dd -or- which contain some identifier such as, say, the "." .  Is there any way to lock out specific folders like this, without having to populate an ignore list?

Phil Harvey

I just thought of a way to do this.  Not pretty, because it still accesses every file, but at least it should work:

in Mac/Linux:

exiftool -if '$directory !~ /\\./' -r DIR

in Windows:

exiftool -if "$directory !~ /\./" -r DIR

I'm pretty sure the backslash doesn't need to be escaped in Windows as it does in Mac/Linux, but I didn't test it to be sure.

This -if condition will fail for any file with a directory name containing a ".".

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

TT

Thanks Phil.  It worked like a charm.  I should have been able to figure it out .. it's so intuitive. ;-) ;-)

I haven't checked to see how much it affects the processing speed.

BTW, the \ didn't need escaping on Windows.