ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: berliner_ffm on May 15, 2020, 03:37:03 PM

Title: Idea create -ext value that selects all images
Post by: berliner_ffm on May 15, 2020, 03:37:03 PM
it would be nice, if the -ext-Option would have a way to select all supported image types in one go, like -ext ImgType
With this there would be no need to check beforehand if other files are in a folder besides the images (e.g. sidecars) or to manually list all images types that may be relevant.
Title: Re: Idea create -ext value that selects all images
Post by: Phil Harvey on May 15, 2020, 03:59:05 PM
I don't understand.  This is the default if you don't specify -ext.  Isn't it?  Are you reading or writing?

- Phil
Title: Re: Idea create -ext value that selects all images
Post by: berliner_ffm on May 15, 2020, 06:24:30 PM
Maybe I am doing something wrong.
Just a simple example

exiftool -createdate .


Will select images as well as Excel-Files, xmp-files, but also files that don't have a createdata will be listet.
This is an example output:

======== C:/users/jens/documents/50_Exiftool/test.dng
Create Date                     : 2019:08:23 15:46:25
======== C:/users/jens/documents/50_Exiftool/test.jpg
======== C:/users/jens/documents/50_Exiftool/test.txt
======== C:/users/jens/documents/50_Exiftool/test_.jpg
======== C:/users/jens/documents/50_Exiftool/thumb.jpg
======== C:/users/jens/documents/50_Exiftool/thumb_resized.jpg
======== C:/users/jens/documents/50_Exiftool/ValueLists.csv
======== C:/users/jens/documents/50_Exiftool/ValueLists_Backup.csv
======== C:/users/jens/documents/50_Exiftool/variables.csv
======== C:/users/jens/documents/50_Exiftool/x.json
======== C:/users/jens/documents/50_Exiftool/xlExifTool -v0-20.xlsm
Create Date                     : 2020:03:27 21:23:08Z
======== C:/users/jens/documents/50_Exiftool/xlExifTool.xlsm
Create Date                     : 2020:03:27 21:23:08Z
======== C:/users/jens/documents/50_Exiftool/xlExifTool2.xlsm
Create Date                     : 2020:03:27 21:23:08Z
======== C:/users/jens/documents/50_Exiftool/xlExifTool_v0-10.xlsm
Create Date                     : 2020:03:27 21:23:08Z

It would be nice that with just one setting only image file (no other documents, no sidecars) would be selected.
Title: Re: Idea create -ext value that selects all images
Post by: Phil Harvey on May 15, 2020, 09:17:58 PM
ExifTool supports reading many different file types.  Use this command to see them:

exiftool -listf

There is no way to select just image files without specifying a -ext option for each of them.  But what you call an image file may not be the same as someone else (eg. is PDF an image?).

- Phil

Edit: I just thought of one possible solution:  Add this to the command:

-if "$mimetype =~ /image/"

this won't be as fast as using -ext, but it may have the effect you are looking for.