Author Topic: Ignore or have default folder for files missing EXIF CreateDate  (Read 78 times)

MrMcSlinky

  • Newbie
  • *
  • Posts: 2
Ignore or have default folder for files missing EXIF CreateDate
« on: January 10, 2019, 07:27:44 AM »
Hi,

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

Code: [Select]
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 13989
    • ExifTool Home Page
Re: Ignore or have default folder for files missing EXIF CreateDate
« Reply #1 on: January 10, 2019, 07:37:40 AM »
To ignore files without a CreateDate:

Code: [Select]
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

Code: [Select]
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

MrMcSlinky

  • Newbie
  • *
  • Posts: 2
Re: Ignore or have default folder for files missing EXIF CreateDate
« Reply #2 on: January 10, 2019, 08:07:34 AM »
Fantastic. Works like a charm.

Thanks for the quick reply.