processing files in folders and subfolders

Started by Archive, May 12, 2010, 08:54:41 AM

Previous topic - Next topic

Archive

[Originally posted by skemp on 2009-10-15 19:42:32-07]

Hi,

Is it possible to read the tags from files (PDFs) in dir myDir and from subfolders of myDir ?

exiftool -T -Directory -Subject myDir >output.txt

Thanks

Archive

[Originally posted by exiftool on 2009-10-16 10:42:57-07]

Yes.  Just add -r -ext pdf to your command

- Phil

Archive

[Originally posted by skemp on 2009-10-16 14:43:22-07]

Thank you very very much.

Another question, is it possible to write data only if it contains a certain string?

For example I only want to know about the description metadata if it contains the word "Getty".

Thanks again.

Archive

[Originally posted by exiftool on 2009-10-16 14:56:12-07]

You can conditionally process files based on a
test of any value using the -if option.  ie)

Code:
exiftool -if "$description =~ /Getty/i" ...

(use single instead of double quotes if you are running
on Mac or Linux.)

here I have added the "i" for case-insensitive matches.

I hope this is what you are looking for.

- Phil