Help requested - Syntax Confirmation Please

Started by Povitch, May 19, 2024, 07:33:17 AM

Previous topic - Next topic

Povitch

Hi,

I am trying to do the following with the enclosed syntax. I would appreciate if you could confirm I have it correct. Truthfully, I have so many in such a mess, I am scared to try too much without this confirmation in case I make things worse! Many thanks.

Take a directory and move all the files
- photos (jpg, heic, Raw) including AAE side car files for apples Portrait mode and any edits AND mov files for live photos
-Movie files from iphones etc.
File move to a new directory structure, YYYY MM DD based on the rule where it looks for the original create date on the file (not the last modified - so it doesn't move based on when the file was moved in Finder last)

I want to keep all the files and their sidecars together essentially and take care of any where the file modification date is after the creation date.

Also, if there are duplicate files, I want to move them as well, so I can run a dedupe process post move, and the duplicate files need to be appended with a -1 -2 etc. I will be running this process multiple times and there may be duplicates from run 2 to put alongside a photo from run 1 etc.

I hope all that makes sense?

Here is my syntax:

exiftool -r -d "/some/other/directory/specification/%Y/%m/%d/%%f%%-c.%%e" "-api largefilesupport" -filename<filemodifydate" "-filename<createdate" "-filename<datetimeoriginal"


StarGeek

One thing that comes to mind is the sidecar files. They might (probably?) not have the same file system time stamps as the main files.

Also, you say "original create date on the file (not the last modified" but you are using CreateDate, not the file system tag, FileCreateDate. CreateDate is a tag embedded in the file and should just about always be exactly the same as DateTimeOriginal, though DateTimeOriginal is less likely to be in videos.

But then you run into the problem that the CreateDate in video files is set to UTC, not local time.  I believe that iPhones will set CreationDate to the local time, so you might put an entry for that to the right of CreateDate.

And you can always test things out by using Testname instead of Filename.  That will output what the file path/name would be without actually moving the file.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).