Sort .JPG .MOV .PNG files into YYYY_MM_DD folders by Media Create Date ?

Started by cruiserandmax, October 12, 2021, 03:23:11 AM

Previous topic - Next topic

cruiserandmax

I have a folder full of thousands of .JPG, .PNG, and .MOV files (pictures and mp4 movies). I want to sort them into folders based on their Media Create Date exif info. So far I am using the command:

exiftool '-Directory<DateTimeOriginal' -d %Y_%m_%d ./

(I am executing the command from within the folder containing all the files)

This seems to sort all of the image format files (.JPG or .PNG) into appropriate folders, but does not do anything with the .MOV files. If I run exiftool on one of the .MOV files it does report valid 'Media Create Date' info..

Is there another argument or arguments I need to include to also handle the .MOV files?


Phil Harvey

Use this command to see what date/time tags are available in your MOV file, and use one of these:

exiftool -s -time:all FILE

It is likely that CreateDate will be a good one to use.

- 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 ($).

StarGeek

Probably CreateDate with the addition of the -api QuickTimeUTC option.  See the fourth paragraph on the Quicktime tags page for the reason.
exiftool '-Directory<CreateDate' -api QuickTimeUTC -d %Y_%m_%d ./
* 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).

cruiserandmax

Quote from: Phil Harvey on October 12, 2021, 07:25:09 AM
Use this command to see what date/time tags are available in your MOV file, and use one of these:

exiftool -s -time:all FILE

It is likely that CreateDate will be a good one to use.

Thanks, Phil!!

using this to look at all the time tags I did see that DateTimeOriginal was only available in the still images.. As you suggested- CreateDate was available in both still and movie files and was correct for all the files.

Thanks for this amazing tool- and for your doubly amazing support!

cruiserandmax

Quote from: StarGeek on October 12, 2021, 04:54:34 PM
Probably CreateDate with the addition of the -api QuickTimeUTC option.  See the fourth paragraph on the Quicktime tags page for the reason.
exiftool '-Directory<CreateDate' -api QuickTimeUTC -d %Y_%m_%d ./

Thanks- just switching to CreateDate did the trick without the -api flag  :D