Main Menu

trouble exporting metadata

Started by nataliekgrassi, August 25, 2024, 07:50:23 AM

Previous topic - Next topic

nataliekgrassi

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:)


StarGeek

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.
* 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).

nataliekgrassi

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!
 

Phil Harvey

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
...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 ($).

nataliekgrassi

Hi Phil,

No, I'm not getting any outputs with that code either.

Thanks

StarGeek

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.
* 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).

nataliekgrassi

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:)

StarGeek

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.
* 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).