-csv does not create a csv formatted file

Started by Daren, July 30, 2011, 08:38:44 PM

Previous topic - Next topic

Daren

Hi! I have version 8.61 on Kubuntu natty installed and I am trying to use the export/import function with the -csv option. The export appears to work but when I try to import I get an error that says "Warning: Tag 'csv' does not exist Nothing to do".

When I look at the csv generated file it is not a csv file! It looks just like the regular output.

Here is the export command I run:

exiftool -all -csv *.jpg > out.csv

Here is the import command I run:

exiftool -csv=out.csv .

Here is the error I get:

Warning: Tag 'csv' does not exist
Nothing to do.


Here is what the out.csv file looks like:

======== dsc01202_11-07-24_v2.jpg
ExifTool Version Number         : 8.61
File Name                       : dsc01202_11-07-24_v2.jpg
Directory                       : .
File Size                       : 4.4 MB
File Modification Date/Time     : 2011:07:30 16:59:36-07:00
File Permissions                : rw-r--r--
File Type                       : JPEG
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Exif Byte Order                 : Big-endian (Motorola, MM)
Make                            : SONY
Camera Model Name               : DSLR-A580
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : GIMP 2.6.11
Exposure Time                   : 1/500
F Number                        : 5.6
Exposure Program                : Shutter speed priority AE
ISO                             : 100
Exif Version                    : 0210
Date/Time Original              : 2011:07:24 12:38:53
Create Date                     : 2011:07:24 12:38:53
Brightness Value                : 7
Exposure Compensation           : 0
Max Aperture Value              : 5.6
Metering Mode                   : Multi-segment
Light Source                    : Unknown
Flash                           : Off, Did not fire
Focal Length                    : 300.0 mm
Sub Sec Time                    : 645
Flashpix Version                : 0100
Color Space                     : Uncalibrated
Exposure Mode                   : Auto
White Balance                   : Auto
Focal Length In 35mm Format     : 450 mm
Scene Capture Type              : Standard
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : Normal
Profile CMM Type                : Lino
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Primary Platform                : Microsoft Corporation
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : IEC
Device Model                    : sRGB
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Media-Relative Colorimetric
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : HP
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
Media White Point               : 0.95045 1 1.08905
Media Black Point               : 0 0 0
Red Matrix Column               : 0.43607 0.22249 0.01392
Green Matrix Column             : 0.38515 0.71687 0.09708
Blue Matrix Column              : 0.14307 0.06061 0.7141
Device Mfg Desc                 : IEC http://www.iec.ch
Device Model Desc               : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc               : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant         : 19.6445 20.3718 16.8089
Viewing Cond Surround           : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type    : D50
Luminance                       : 76.03647 80 87.12462
Measurement Observer            : CIE 1931
Measurement Backing             : 0 0 0
Measurement Geometry            : Unknown (0)
Measurement Flare               : 0.999%
Measurement Illuminant          : D65
Technology                      : Cathode Ray Tube Display
Red Tone Reproduction Curve     : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
Image Width                     : 4920
Image Height                    : 3272
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Aperture                        : 5.6
Image Size                      : 4920x3272
Scale Factor To 35 mm Equivalent: 1.5
Shutter Speed                   : 1/500
Circle Of Confusion             : 0.020 mm
Field Of View                   : 4.6 deg
Focal Length                    : 300.0 mm (35 mm equivalent: 450.0 mm)
Hyperfocal Distance             : 802.33 m
Light Value                     : 13.9
======== dsc01236_11-07-24_v2.jpg
ExifTool Version Number         : 8.61
File Name                       : dsc01236_11-07-24_v2.jpg
Directory                       : .
File Size                       : 3.2 MB
File Modification Date/Time     : 2011:07:30 16:59:59-07:00
File Permissions                : rw-r--r--
File Type                       : JPEG
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Exif Byte Order                 : Big-endian (Motorola, MM)
Make                            : SONY
Camera Model Name               : DSLR-A580
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : GIMP 2.6.11
Exposure Time                   : 1/1000
F Number                        : 5.6
Exposure Program                : Shutter speed priority AE
ISO                             : 500
Exif Version                    : 0210
Date/Time Original              : 2011:07:24 12:41:38
Create Date                     : 2011:07:24 12:41:38
Brightness Value                : 7.25
Exposure Compensation           : 0
Max Aperture Value              : 5.6
Metering Mode                   : Multi-segment
Light Source                    : Unknown
Flash                           : Off, Did not fire
Focal Length                    : 200.0 mm
Sub Sec Time                    : 904
Flashpix Version                : 0100
Color Space                     : Uncalibrated
Exposure Mode                   : Auto
White Balance                   : Auto
Focal Length In 35mm Format     : 300 mm
Scene Capture Type              : Standard
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : Normal
Profile CMM Type                : Lino
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Primary Platform                : Microsoft Corporation
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : IEC
Device Model                    : sRGB
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Media-Relative Colorimetric
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : HP
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
Media White Point               : 0.95045 1 1.08905
Media Black Point               : 0 0 0
Red Matrix Column               : 0.43607 0.22249 0.01392
Green Matrix Column             : 0.38515 0.71687 0.09708
Blue Matrix Column              : 0.14307 0.06061 0.7141
Device Mfg Desc                 : IEC http://www.iec.ch
Device Model Desc               : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc               : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant         : 19.6445 20.3718 16.8089
Viewing Cond Surround           : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type    : D50
Luminance                       : 76.03647 80 87.12462
Measurement Observer            : CIE 1931
Measurement Backing             : 0 0 0
Measurement Geometry            : Unknown (0)
Measurement Flare               : 0.999%
Measurement Illuminant          : D65
Technology                      : Cathode Ray Tube Display
Red Tone Reproduction Curve     : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
Image Width                     : 3804
Image Height                    : 2536
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Aperture                        : 5.6
Image Size                      : 3804x2536
Scale Factor To 35 mm Equivalent: 1.5
Shutter Speed                   : 1/1000
Circle Of Confusion             : 0.020 mm
Field Of View                   : 6.9 deg
Focal Length                    : 200.0 mm (35 mm equivalent: 300.0 mm)
Hyperfocal Distance             : 356.59 m
Light Value                     : 12.6
    2 image files read


Any help would be greatly appreciated, thank you!


ryerman

To create your csv file, try this:   exiftool -csv -ext jpg -all DIR > out.csv
where DIR is a directory pathname.

-ext restricts processing to files with the specified extension.  See the documentation.
-all is unnecessary.  The documentation says "If no tags are specified, all available information is extracted (as if -All had been specified)".
If you add the -r option, files in every sub-directory will also be processed.

It's a good idea to surround pathnames with quotes because without them spaces will cause problems.
In Windows, we use double quotes but I believe Linux users must use single quotes.

Finally, the file out.csv can be created anywhere.

Here is a Windows specific example:    exiftool -csv -ext jpg -r "F:\Photos\2010" > "C:\Users\Jim\Desktop\out.csv"

Jim
Windows 10 Home 64 bit, Exiftool v12.61

Daren

Ryerman, thank you..that seemed to work. There are some unexpected and unwanted results also like it it creates a copy and adds "original" to the file name extension. I really need to restrict it to the EXIF and IPTC info only so I will look up in the docs how do this and post again if I cannot find it.

Thank you!

Phil Harvey

I'm glad ryerman helped you because as far as I could tell your original 2 commands were fine (and worked fine for me when I tried them).

Add -exif:all to the command that generates the .csv file to copy only the EXIF information.

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

Daren

Quote from: Phil Harvey on July 31, 2011, 01:25:42 PM

Add -exif:all to the command that generates the .csv file to copy only the EXIF information.

- Phil

Will -iptc:all also work??

TIA

Phil Harvey

Yes.  You may specify any valid group name with -GROUP:all, and/or specify individual tag names with or without group prefixes.  If you want the information written back into the same group, specify -g1 on the command line as well -- this adds the family 1 group names to the first row in the CSV file.

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

Daren

Thanks to everyone, all of your help did the trick! I can now export the IPTC/EXIF info to a csv and import it back.

Thanks, exiftool is amazing!

jpfexif

Hi
I am new and just begin working with ExifTool.
I downloaded a standalone version for W7 64 bits.
My aim is only to extract some tags and write them in a csv file but I get never this file.
This is my cmd line :

exiftool -k -createdate -filename -gpsposition -csv "D:\Documents\Informatique\ExifTool\Test" > "D:\Documents\Informatique\ExifTool\Test\out.csv"
The directory has only 4 jpeg files
And here is what I get: see attachement

I can't understand what is wrong !


Thank you for helping

Phil Harvey

This is unusual.  It looks like your greater-than symbol isn't really a greater-than symbol.

How did you enter this command?   Try re-typing the command and being sure to use the normal ">".

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

Daren

These are my notes from this thread and they worked for me, maybe they will help you..

# write all of the info from the jpg's to a csv in the current dir
exiftool -csv -ext jpg -all . > out.csv

# write all iptc info from the jpg's to a csv in the current dir
exiftool -csv -iptc:all -ext jpg -all . > out.csv

# write all exif info from the jpg's to a csv in the current dir
exiftool -csv -exif:all -ext jpg -all . > out.csv

# write all exif and iptc info from the jpg's to a csv in the current dir
exiftool -csv -exif:all -iptc:all -ext jpg -all . > out.csv

# import all of the info back into the jpg's
exiftool -csv=out.csv -ext jpg .

jpfexif

Hi

I have still the same problem : I get no csv file with the following command :

exiftool -k -createdate -filename -gpsposition -csv "D:\Documents\Informatique\ExifTool\Test" > "D:\Documents\Informatique\ExifTool\Test\out.csv"

The data of the pictures are printed in the window in a csv format but before I get this error messages :

Error opening directory >
File not found : D:\Documents\Informatique\ExifTool\Test\out.csv


I tested different type of ">" but without any result.

Any help would be appreciated.


JPF

ryerman

Quote from: jpfexif on February 18, 2012, 03:28:54 AM
...exiftool -k -createdate -filename -gpsposition -csv "D:\Documents\Informatique\ExifTool\Test" > "D:\Documents\Informatique\ExifTool\Test\out.csv"...

...Error opening directory >
File not found : D:\Documents\Informatique\ExifTool\Test\out.csv...
Your Exiftool command looks correct. I copied it from your post and it worked on my system.

My guess is that this is a Windows "Permissions" problem.  Exiftool may not have permission to open the directory you specified or to create a file there.  Windows 7 seems to be more conservative about who and what it allows to access folders.  Try creating a completely new folder (D:\Test) and directing the output there.

You may want to do some research about Windows file permissions and how to change them.
For unsophisticated users like me, file and folder permissions are complicated and confusing. http://forums.winamp.com/showthread.php?t=339273 is a thread from the Winamp forums that may help.

Jim     
Windows 10 Home 64 bit, Exiftool v12.61

Phil Harvey

Hi Jim,

QuoteError opening directory

This indicates that the ">" was passed to exiftool as an argument instead of being handled by the shell.  I have never seen this.  Are you running this in a Windows cmd.exe shell?  I would assume not.  The ">" only works if you are executing the command from within a shell.  (ie. this will not work as an ExifToolGUI exiftool-direct command)

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

BogdanH

Hi,

I have take a look on attached file and as it seems, exiftool is somehow being run from shortcut -that is, shortcut points to exiftool.exe directly (one can recognize that, because window title contains ExifTool's icon).

To JPF:
Use Start menu, find "Command Prompt" there and run it. After console window appears, type commands there.

Bogdan

jpfexif

Hi Bogdan

You where right !

Until now I was running ExifTool from a shortcut because it is easier and there is a command stack.

Typing directly the ExifTool command in the window console works properly.

Now I get exactly what I expect.

Thanks a lot for all your help.


JPF