ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: savvypete on July 24, 2011, 12:25:51 PM

Title: ExifTool Output
Post by: savvypete on July 24, 2011, 12:25:51 PM
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
Title: Re: ExifTool Output
Post by: Phil Harvey on July 24, 2011, 06:41:12 PM
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
Title: Re: ExifTool Output
Post by: savvypete on July 25, 2011, 12:11:15 PM
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
Title: Re: ExifTool Output
Post by: Phil Harvey on July 25, 2011, 12:15:33 PM
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
Title: Re: ExifTool Output
Post by: savvypete on July 26, 2011, 04:30:18 PM
Thanks, Phil. That's all the explanation I need. Peter