Hi all,
I'm new to exiftool and having some issues exporting metadata.
When I open command prompt and ask for a summary, it can retrieve all my metadata. But when I try to export it with the code below, I just get blank csv files
exiftool -csv -r "path\to\file" > file.csv
Does anybody know how I can fix this?
Thank you:)
What OS? I'm guessing Windows by the use of backslashes in "path\to\file". If so, are you using CMD or PowerShell?
Do you think the CSV file is empty because it doesn't load in a spreadsheet program, or have you tried opening the file in a text editor to double-check? And what spreadsheet program are you using? If I recall, Excel is much pickier about the CSV files it loads over Libre/OpenOffice.
Hi,
Thanks for your reply!
Yes, I'm on Windows (11), and using cmd. I'm using ExifTool version 12.92_64, and trying to analyse metadata from JPG files.
The csv file shows as 0KB and is blank both on Excel and in text editors.
Thank you!
Do you get an output with this command (ie. without the redirection)?:
exiftool -csv -r "path\to\file"
If this gives an output, then I think you are looking at the wrong out.csv file. The file will be output in the current working directory. Use the "pwd" command to see what that is.
- Phil
Hi Phil,
No, I'm not getting any outputs with that code either.
Thanks
By default, CMD opens up in C:\Windows\System32 which is a protected folder and exiftool cannot write to it. You will need to change the directory CD to something you can write into.
You would type CD (case doesn't matter), then a space, then drag the directory where you want to write the CSV to directly onto the CMD window. The full path will appear. If the directory is not on your C: drive, you want to type /d followed by a space before dropping the directory.
Finally, hit enter, and you should be able to run your exiftool command.
Hi, this is the code in my command prompt:
Microsoft Windows [Version 10.0.22631.4037]
(c) Microsoft Corporation. All rights reserved.
C:\Users\natal> CD/d "D:\data\Occupancy\photos\june\CP\CP"
D:\data\Occupancy\photos\june\CP\CP> exiftool -csv -r "D:\data\Occupancy\photos\june\CP\CP" > juneCP.csv
The code will generate a csv into the chosen directory, but the csv is still only a blank document. Have I entered the code wrong? Sorry- I'm very new to exiftool and have never worked in command prompt before.
Thank you:)
You should at the very least have a csv file with the word "SourceFile" in it and the same if you run the command without redirection except it would also say how many directories scanned.
For example, I run
exiftool -csv y:\!temp\Empty
which is a directory with nothing in it, the output is
SourceFile
1 directories scanned
0 image files read
If you have an antivirus, check to see if that is blocking exiftool. That hasn't been a problem in a while, but it's worth checking.