ExifTool Output

Started by savvypete, July 24, 2011, 12:25:51 PM

Previous topic - Next topic

savvypete

The following statement works perfectly for me: exiftool(-filename -CreateDate -k -T)

Given a directory of jpg images, it produces a table in the console window that I can then copy to a text file. Is there a way to have this statement write the table directly to a single text file? All my attempts end up as multiple sidecars.

Thanks

Phil Harvey

Hi Pete,

You can do this by creating a Windows .BAT file.  The .BAT file should contain a single line:

exiftool -filenname -createdate -T %* > out.txt

When you drag and drop one or more files and/or folders on this .BAT file, it will create a single output file (out.txt) containing the information for all files.

For this to work, the ExifTool application should be renamed to "exiftool.exe" and placed somewhere in your PATH.  The "out.txt" file will end up in whatever working directory you use for the .BAT file.  (I believe you can configure this via the properties of the .BAT file).  Alternatively, you can specify a directory for both exiftool and out.txt in the command if you like.

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

savvypete

Thanks, Phil. Works perfectly.

I know the * operator is a necessary part of this command but what exactly does it signify in general in an ExifTool command?

Cheers,

Peter

Phil Harvey

Hi Pete,

The %* on the command line is a Windows batch file thing, not an exiftool feature.  It represents all of the arguments on the command line that executed the batch file.  When you do drag-and-drop, the arguments are the names of the files that you drop, so this effectively passes on the file names from the batch command to exiftool.

I hope this makes some sense.  I probably didn't explain it very well.

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

savvypete

Thanks, Phil. That's all the explanation I need. Peter