I am using the follwing command to extract image data to a CSV:
exiftool -csv -r -filename -imagewidth -imageheight assets/photo/ > _data/images.csv
Which results in:
SourceFile,FileName,ImageWidth,ImageHeight
assets/photo/A.jpg,A.jpg,632,790
assets/photo/B.jpg,B.jpg,1280,800
In order to import this data, I need to prepend a slash to the SourceFile field; e.g. "/assets/photo/A.jpg"
Is there a way to do this?
One way to do this is to generate the CSV yourself using the -p option:
exiftool -echo "SourceFile,FileName,ImageWidth,ImageHeight" -p "/$directory/$filename,$filename,$imagewidth,$imageheight" assets/photo > _data/images.csv
This should work as long as no filename contains a comma or a quote.
- Phil
Quote from: Phil Harvey on April 20, 2018, 07:17:01 AM
One way to do this is to generate the CSV yourself using the -p option:
exiftool -echo "SourceFile,FileName,ImageWidth,ImageHeight" -p "/$directory/$filename,$filename,$imagewidth,$imageheight" assets/photo > _data/images.csv
This should work as long as no filename contains a comma or a quote.
- Phil
Works like a charm. Thanks, Phil.