Get filename tag for unsupported file types

Started by wsampson, March 27, 2012, 01:17:20 PM

Previous topic - Next topic

wsampson

Hi all,

I'm trying to run exiftool on a directory with a mix of supported and unsupported file types (pub, psd, etc.). I'd like to grab the filenames and creation dates for the supported files and just the filenames for the unsupported files. What I have been running on the 'data' directory:

exiftool -csv -filename -r -CreateDate -d %Y%m%d data > ~/Desktop/out.csv

I know I could force a file extension with -ext (e.g. -ext .pub), but in that case I need to then include all the other extensions as well. Since these directories contain a really large mix of extensions, that would take quite a while. Is there a way to make exiftool pick up the filename for any file, regardless if the extension is supported?

Thank you,
w

Phil Harvey

There is no option to allow this, but you can do what you want by commenting out lines 2730-2732 of the exiftool script (version 8.85), like this:

#            } elsif (not GetFileType($file)) {
#                next unless $doUnzip;
#                next unless $file =~ /\.(gz|bz2)$/i;


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

wsampson

Many thanks. That did the trick! Not a solution I would have found any time soon either!

Best,
w