ExifTool Forum

ExifTool => Developers => Topic started by: herb on July 04, 2015, 04:49:11 AM

Title: Question to hidden files
Post by: herb on July 04, 2015, 04:49:11 AM
Hello Phil,

I work with Exiftool 9.98 on a windows system.

With command: exiftool -tag_x=something -ext jpg <DIR>
all *.jpg files in directory DIR are modfied.
With command: exiftool -tag_x=something --ext jpg <DIR>
all files, which are not a jpg-file, in directory DIR are modified.

A wonderful feature of Exftool, which works on all files ( e.g. also hidden files).

Now my question: Is it possible to tell Exiftool to ignore all hidden (and e.g. all system) files in directory DIR.
I did not find anything in documentation. Or have I overseen another mechanism to tell Exiftool NOT to work for specific files?

Best regards
Herb
Title: Re: Question to hidden files
Post by: Phil Harvey on July 04, 2015, 06:25:27 AM
Hi Herb,

ExifTool doesn't have an option like this.  The Hidden attribute is peculiar to the Windows filesystem, so this option would be platform dependent.

However, it may be possible for me to add a special FileAttributes tag, which would be extracted only for files on Windows and would let you do what you want using the -if option.  Let me think about this.

- Phil
Title: Re: Question to hidden files
Post by: herb on July 25, 2015, 05:20:46 AM
Hello Phil,

thank you very much for the enhancement with version 9.99 of Exiftool.
To display metadata, when I start Exiftool with option -api systemtags=1 I get a line that explains whether a file is hidden or not: e.g.:
   File Attributes: Regular; (none); Hidden, Archive

But now I need your help again.
It is unclear to me how the -if has to look like. Is it a regular expression?

Thanks for your help in advance
Best regards
Herb
Title: Re: Question to hidden files
Post by: Phil Harvey on July 25, 2015, 08:37:28 AM
Hi Herb,

The command would look like this:

exiftool -api systemtags -if "$fileattributes =~ /Hidden/" ...

- Phil
Title: Re: Question to hidden files
Post by: herb on July 25, 2015, 11:49:32 AM
Hello Phil,

thanks again for your help.

Best regards
Herb