Author Topic: Get filename tag for unsupported file types  (Read 1800 times)

wsampson

  • Newbie
  • *
  • Posts: 2
Get filename tag for unsupported file types
« 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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14879
    • ExifTool Home Page
Re: Get filename tag for unsupported file types
« Reply #1 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:

Code: [Select]
#            } 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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

wsampson

  • Newbie
  • *
  • Posts: 2
Re: Get filename tag for unsupported file types
« Reply #2 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