News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Ignore or have default folder for files missing EXIF CreateDate

Started by MrMcSlinky, January 10, 2019, 07:27:44 AM

Previous topic - Next topic

MrMcSlinky

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.

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

MrMcSlinky

Fantastic. Works like a charm.

Thanks for the quick reply.