Help sorting photos and videos into folders

Started by dmcnaugh15, April 26, 2025, 06:44:01 PM

Previous topic - Next topic

dmcnaugh15

I'm able to successfully sort my photos into my preferred folder structure using the following cmd line:

exiftool -d "%Y/%Y_%m/%Y_%m_%d" -r -v "-directory<C:\Users\dmcna\Desktop\Test\Organized/$DateTimeOriginal" C:\Users\dmcna\Desktop\Aquarium

The problem is, my .mov files don't get moved.  So, I found this post (https://exiftool.org/forum/index.php?topic=12640.0), and based on that, I attempted the following line:

exiftool -echo "Renaming files" -d "%Y/%Y_%m/%Y_%m_%d" -r -v -api QuickTimeUTC "-directory<C:\Users\dmcna\Desktop\Test\Organized/$DateTimeOriginal" C:\Users\dmcna\Desktop\Aquarium

But it did not work.  All the photos still move appropriately, but the video remains.  I'm still working on it, but if anyone sees a quick fix that could save me time, I would greatly appreciate it!

dmcnaugh15

Quote from: dmcnaugh15 on April 26, 2025, 06:51:32 PMalso tried this (based on the link in the last message):

exiftool -echo "Renaming files" -d "%Y/%Y_%m/%Y_%m_%d" -r -v -api QuickTimeUTC "-filename<CreateDate" "-filename<DateTimeOriginal" -directory<C:\Users\dmcna\Desktop\Test\Organized/$DateTimeOriginal" C:\Users\dmcna\Desktop\Aquarium

exiftool -echo "Renaming files" -d "%Y/%Y_%m/%Y_%m_%d" -r -v -api QuickTimeUTC -filename<CreateDate -filename<DateTimeOriginal -directory<C:\Users\dmcna\Desktop\Test\Organized/$DateTimeOriginal" C:\Users\dmcna\Desktop\Aquarium

They don't move anything and just throw an errors.

Phil Harvey

This could happen if you are using a very old version of ExifTool.

What version are you running?  (exiftool -ver)

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


Phil Harvey

Thanks.  OK.  The other problem that I should have realized then:

The videos don't contain DateTimeOriginal, which you are using to rename the files.  Change this to CreateDate and all should be good.

- Phil

Edit:  I've added a note to FAQ 16 to address this issue.
...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 ($).

dmcnaugh15

Quote from: dmcnaugh15 on April 26, 2025, 07:22:34 PMI just tried this:

exiftool -echo "Renaming files" -d "%Y/%Y_%m/%Y_%m_%d" -r -v -CreateDate -api QuickTimeUTC "-directory<C:\Users\dmcna\Desktop\Test\Organized/$DateTimeOriginal" C:\Users\dmcna\Desktop\Aquarium

But, the result is the same.  Photos move.  Videos (.mov) don't move.

Phil Harvey

No.  I meant to change DateTimeOriginal in the original command to CreateDate.  Hopefully this makes sense.

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

dmcnaugh15

Ahhh!  Got it.  That works.  Thanks so much! :)