ExifTool Forum

ExifTool => Newbies => Topic started by: dmcnaugh15 on April 26, 2025, 06:44:01 PM

Title: Help sorting photos and videos into folders
Post by: dmcnaugh15 on April 26, 2025, 06:44:01 PM
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!
Title: Re: Help sorting photos and videos into folders
Post by: dmcnaugh15 on April 26, 2025, 06:53:29 PM
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.
Title: Re: Help sorting photos and videos into folders
Post by: Phil Harvey on April 26, 2025, 07:07:42 PM
This could happen if you are using a very old version of ExifTool.

What version are you running?  (exiftool -ver)

- Phil
Title: Re: Help sorting photos and videos into folders
Post by: dmcnaugh15 on April 26, 2025, 07:09:03 PM
13.28
Title: Re: Help sorting photos and videos into folders
Post by: Phil Harvey on April 26, 2025, 07:10:59 PM
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 (https://exiftool.org/faq.html#Q16) to address this issue.
Title: Re: Help sorting photos and videos into folders
Post by: dmcnaugh15 on April 26, 2025, 07:23:34 PM
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.
Title: Re: Help sorting photos and videos into folders
Post by: Phil Harvey on April 26, 2025, 07:40:50 PM
No.  I meant to change DateTimeOriginal in the original command to CreateDate.  Hopefully this makes sense.

- Phil
Title: Re: Help sorting photos and videos into folders
Post by: dmcnaugh15 on April 26, 2025, 07:44:26 PM
Ahhh!  Got it.  That works.  Thanks so much! :)