I want to use EXIFTOOL to extract the datetimeoriginal for all jpg, jpeg and png files in the parent directory and its subfolders and create an output file in the parent directory.
In DOS, I'm in the parent directory C:\Users\Gary\every photo
and I'm running:
exiftool -r *.jpg *.jpeg *.png -datetimeoriginal > newjpg.txt
But the newjpg.txt file is empty.
What do I have wrong?
See -r docs (https://exiftool.org/exiftool_pod.html#r-.--recurse) and Common Mistake 2 (https://exiftool.org/mistakes.html#M2).
Wildcards don't work with -r. Use -ext (https://exiftool.org/exiftool_pod.html#ext-EXT---ext-EXT--extension) instead and either a dot . for the current directory or a more complete directory path "C:\Users\Gary\every photo" (quotes are needed due to the space in the path).
exiftool -r -ext jpg -ext jpeg -ext png -datetimeoriginal . > newjpg.txt
In the COMMAND PROMPT screen, I using:
exiftool -csv -T -r -ext jpg -ext jpeg -ext png -filepath -datetimeoriginal -DateTaken -FileModifyDate -FileAccessDate -FileCreateDate -ModifyDate -CreateDate -make -model -filesize -imagesize -megapixels . > newjpg.txt
At the beginning of the output, why are "./ and ./ appearing before folder name?
For example:
"./CHRISTMAS
"./HAYDEN, MARYANN, STEVE & JENN
"./ITALY - VENICE
./ARCHES NATIONAL PARK
./AZTEC NATIONAL MONUMENT
./BIKE
The quote because of the spaces in the directory name, the dot to indicate the current directory :)
CHRISTMAS doesn't contain a space.
See the docs on the -csv option (https://exiftool.org/exiftool_pod.html#csv-CSVFILE). The first column should contain the path+filename based upon the directory given. This is the SourceFile column and contains the path plus the filename. It is included for when you want to use the CSV file to import metadata back into the files.
The second column should contain the filepath data you are looking for.
CHRISTMAS may not contain a space, but there probably is one in the rest of that entry.
If you don't want the Sourcefile column, you can either edit it out yourself by importing into OpenOffice or using CSVKit (requires python). Or you can roll your own CSV using the the -p (https://exiftool.org/exiftool_pod.html#p-FMTFILE-or-STR--printFormat) option.
CHRISTMAS has no leading or trailing space.
Can you list first few rows here so we can see what might be causing this?