ExifTool Forum

ExifTool => Newbies => Topic started by: MrMcSlinky on January 10, 2019, 07:27:44 AM

Title: Ignore or have default folder for files missing EXIF CreateDate
Post by: MrMcSlinky on January 10, 2019, 07:27:44 AM
Hi,

First context...
I have the following in a batch file.


perl C:\ExifTool\Image-ExifTool-11.22\exiftool -v "-Directory<CreateDate" -d "D:\My Pictures\RAW\%%Y\%%Y-%%m-%%d" -r -ext orf "D:\My Pictures\100OLYMP"
perl C:\ExifTool\Image-ExifTool-11.22\exiftool -v "-Directory<CreateDate" -d "D:\My Pictures\%%Y\%%Y-%%m-%%d" -r -ext jpg -ext mov "D:\My Pictures\100OLYMP"
perl C:\ExifTool\Image-ExifTool-11.22\exiftool -v -o . "-Directory<CreateDate" -d "D:\My Pictures\%%Y\%%Y-%%m-%%d" -r "D:\**user**\Google Photos"


The first two lines work perfectly. They place all the raw images in one directory based on CreateDate and jpg and mov files into another.
The third line takes a copy of my Google Drive photos and puts them into the same folder structure as the jpgs. However I have images in my google photos that do not contain any EXIF or equivalent tags (Screenshots and the like). (They have FileCreate date which is useless as this is from when they were synced in the folder, not when they were made.) They just get dumped into D:\My Pictures without subfolders.

Question: How do I either ignore files that do not contain the CreateDate tag or place them in a default directory such as D:\My Pictures\Other.

I do know that I can accomplish this with an additional line to move them afterwards, however that would mean I would needlessly write then move these files each time I run the batch file instead of a 'check and move on'.

Thanks in advance.
Title: Re: Ignore or have default folder for files missing EXIF CreateDate
Post by: Phil Harvey on January 10, 2019, 07:37:40 AM
To ignore files without a CreateDate:

perl C:\ExifTool\Image-ExifTool-11.22\exiftool -if "$createdate" -v -o . "-Directory<CreateDate" -d "D:\My Pictures\%%Y\%%Y-%%m-%%d" -r "D:\**user**\Google Photos"

or to copy them to a default directory

perl C:\ExifTool\Image-ExifTool-11.22\exiftool -v -o . "-Directory=D:\My Pictures\Other" "-Directory<CreateDate" -d "D:\My Pictures\%%Y\%%Y-%%m-%%d" -r "D:\**user**\Google Photos"

- Phil
Title: Re: Ignore or have default folder for files missing EXIF CreateDate
Post by: MrMcSlinky on January 10, 2019, 08:07:34 AM
Fantastic. Works like a charm.

Thanks for the quick reply.