Folks,
I'm a DOS user from way back which is why this is a bit frustrating and embarrassing.
I'm clearly using an incorrect search criteria or it's such simple thing that I'm missing a fundamental understanding.
What I want to do is get the image filename and the createdate from a bunch of JPGs in a number of sub-directories into a file.
This is what I have
exiftool -r -csv -filename -d "%Y%m%d%H%m%S" -createdate . -ext jpg>output.csv
To be honest this works well enough although I get the subdirectory path as well because of the -r but if omit the -r it's stops recursing. However my real problem is I've found a few images being picked up that have nothing to do with what I'm doing.
Fortunately all of my target images are DSC*.jpg pattern.
For the life of me I can't find a way to apply a criteria to the command line that only picks up the "DSC*.jpg" file names.
I have read the "." and -r essentially work hand in hand and *.* is a problem but I can't find the solution.
Advice greatly appreciated.
I can't think of an easy way to do this if recursing subdirectories using any DOS feature.
But you can use the ExifTool -if option to do it:
exiftool -r -csv -filename -d "%Y%m%d%H%m%S" -createdate . -ext jpg -if "$filename =~ /^DSC/" >output.csv
If you don't want the SourceFile column, then you could do this:
exiftool -r -p "$filename,$creatdate" -d "%Y%m%d%H%m%S" . -ext jpg -if "$filename =~ /^DSC/" >output.csv
- Phil
Thanks Phil,
The latter is exactly what I'm after. I was wondering if "-if" was the right answer.
Thanks again.