ExifTool Forum

ExifTool => Newbies => Topic started by: wsampson on March 27, 2012, 01:17:20 PM

Title: Get filename tag for unsupported file types
Post by: wsampson on March 27, 2012, 01:17:20 PM
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
Title: Re: Get filename tag for unsupported file types
Post by: Phil Harvey on March 27, 2012, 02:10:51 PM
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
Title: Re: Get filename tag for unsupported file types
Post by: wsampson on March 27, 2012, 03:19:49 PM
Many thanks. That did the trick! Not a solution I would have found any time soon either!

Best,
w