ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: lumiere on December 26, 2021, 05:55:36 PM

Title: Filter out small files
Post by: lumiere on December 26, 2021, 05:55:36 PM
On my disks I have a lot of family and non-family pictures (thumbnails, caches etc). I know for sure that family pictures are much bigger.
Is there any way to tell exiftool to deal only with files bigger than X ?
Title: Re: Filter out small files
Post by: StarGeek on December 26, 2021, 06:35:16 PM
Use something like
-if "$filesize# >4000000"
where the number is number of bytes.
Title: Re: Filter out small files
Post by: Phil Harvey on December 26, 2021, 09:31:20 PM
Depending on what you are doing, you may be able to speed up processing significantly by using -if5 instead of -if.  Read the application documentation for details.

- Phil
Title: Re: Filter out small files
Post by: lumiere on December 27, 2021, 06:03:48 PM
I looked at:
https://exiftool.org/
https://exiftool.org/exiftool_pod.html
https://exiftool.org/faq.html
but none of those mentioned $filesize option.
Which specific page will tell me about "if" and "filesize" ?
Title: Re: Filter out small files
Post by: StarGeek on December 27, 2021, 06:49:13 PM
-if option (https://exiftool.org/exiftool_pod.html#if-NUM-EXPR)

Extra Tags page (https://exiftool.org/TagNames/Extra.html)

Also, the hashtag at the end of Filesize is a shortcut for the -n (--printConv) option (https://exiftool.org/exiftool_pod.html#n---printConv) which will give you the size in bytes rather than converting it to K/M/G/TBytes.