ExifTool Forum

ExifTool => Newbies => Topic started by: jacorfe on March 24, 2016, 08:00:55 AM

Title: Sorting by date and removing duplicates
Post by: jacorfe on March 24, 2016, 08:00:55 AM
Hi All,

  I am trying to use Exiftool to rearrange my photos in to a directory structure of "YYYY/MM-DD/" keeping the original filename. The date of taking coupled with the filename is extremely likely to be unique.

This I can do using:

c:\exiftool.exe -k -r "-directory<filemodifydate" "-directory<createdate" "-directory<datetimeoriginal" -d "D://Sorted/%Y/%m-%d/" D:\Sorted\


...but I have multiple copies of photos spread around numerous drives. When a copy is found an error is produced and the copy left in a folder I wanted emptied.

Error: 'D://Sorted/2007/05-20/DSC_0280.JPG' already exists - D:/photos/Photos-1/104CERN_/DSC_0280.JPG

What I would like is for any copies ie for those files that already exist to either be copied over (brute force approach) or deleted so I end up with only one copy in the sorted folders, and the original folders empty.


Many thanks for your help.

Title: Re: Sorting by date and removing duplicates
Post by: Phil Harvey on March 25, 2016, 04:37:40 PM
Sorry, ExifTool won't overwrite or delete an image file.  This is for safety reasons.

You could run another command afterwards to move the duplicates to another directory, say -d "D://Duplicates/%Y/%m-%d/", then delete that directory yourself if you are sure they are in fact duplicates.

- Phil