Question to hidden files

Started by herb, July 04, 2015, 04:49:11 AM

Previous topic - Next topic

herb

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

Phil Harvey

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

herb

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

Phil Harvey

Hi Herb,

The command would look like this:

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

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

herb

Hello Phil,

thanks again for your help.

Best regards
Herb