Export DateTimeOriginal to CSV file

Started by CoffeePrincess, January 13, 2016, 03:43:58 PM

Previous topic - Next topic

CoffeePrincess

Hello, I'm hoping to export the DateTimeOriginal data from thousands of photos into Excel. These photos are in multiple folders. I don't need to extract the name of each photo, I just need the date/time data exported into csv format (I would do this one folder at a time and compile the data in a large Excel spreadsheet).  If I'm using a Mac and the photos are on on my desktop, what would be the code for this? Sorry, I'm pretty new to this, and most of the results for my online help searches were very complicated.  Thanks!

StarGeek

Your command would be something like:
exiftool -csv -datetimeoriginal /path/to/dir >output.csv

You could put multiple paths in the command if you like to do them all at once.  Or, if all the dirs fall under a single directory, you could just use the top directory and add -r to recuse into all the subdirectories.

Your output.csv will contain two columns, a sourcefile column which will have the full filenames of all the files and the DateTimeOriginal column.  If you feel the need you could delete the SourceFile column in Excel.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Alan Clifford

When I read the post my reaction was, "If only one field is required, there are no values to separate with commas."

So maybe the requirement is to split the date up into separate fields?

CoffeePrincess

Thank you so much!!!!  How do I specify an output directory?

Phil Harvey

exiftool -csv -datetimeoriginal /path/to/dir > /some/output/directory/output.csv
...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 ($).

CoffeePrincess

Thank you, Mr. Harvey! Your program saved me:)