ExifTool Forum

ExifTool => Newbies => Topic started by: nogginthenog on May 22, 2015, 02:12:55 PM

Title: Find all files with no EXIF data?
Post by: nogginthenog on May 22, 2015, 02:12:55 PM
Would some kind soul help a person who, although having many years' experience of command-line applications, is new to ExifTool and a bit pressed for time. I need to do a recursive directory scan and output the filenames (preferably with full path) of all files that have no EXIF info at all, while remaining silent on all files that do have EXIF info. 

I'm sure this is a piece of cake to you lot.
Title: Re: Find all files with no EXIF data?
Post by: Phil Harvey on May 22, 2015, 02:14:43 PM
If you really do mean EXIF, then yes, it is a piece of cake:

exiftool -p "$directory/$filename" -if "not $exif:all" -r DIR

(there are lots of different ways to format the output, but I have given you just the full path name of the file here)

- Phil
Title: Re: Find all files with no EXIF data?
Post by: nogginthenog on May 22, 2015, 02:26:24 PM
Superb. Many thanks! I shall study that example till I have a proper grasp. Meanwhile, may I ask why you wondered whether I really did mean EXIF info?  What am I missing?
Title: Re: Find all files with no EXIF data?
Post by: Phil Harvey on May 22, 2015, 02:29:18 PM
Because ExifTool also extracts other information types like XMP for example.  Many people new to metadata don't know the difference.

- Phil
Title: Re: Find all files with no EXIF data?
Post by: nogginthenog on May 22, 2015, 02:43:07 PM
Aha. Understood. Thanks again.
Title: Re: Find all files with no EXIF data?
Post by: Phil Harvey on May 22, 2015, 02:57:44 PM
Neat!  I just discovered an ExifTool feature that I had forgotten (some of those Extra tags (https://exiftool.org/TagNames/Extra.html) are really cool):

You can use the FilePath tag to return the absolute file path if you want...

exiftool -s3 -q -filepath -if "not $exif:all" -r DIR

This saves having to use the -p option, but then we need to add -s3 -q to return only tag values and suppress other output.

- Phil
Title: Re: Find all files with no EXIF data?
Post by: humbledumble on June 20, 2022, 07:18:29 AM
Firstly - thanks for the excellent tool. Helped me enourmosly.
I just looked up this specific issue, but low coffeeine-levels managed to make me type DIR and I had the first laugh of the day:
;D


Error: File not found - DIR
You were meant to enter any valid directory name, not "DIR" literally.


PS: Sorry for the necro-bump.
Title: Re: Find all files with no EXIF data?
Post by: Phil Harvey on June 20, 2022, 02:03:24 PM
:)