Moving into folder based on DateTimeOriginal, CreateDate and FileModifyDate

Started by kimleang, August 11, 2014, 10:20:43 PM

Previous topic - Next topic

kimleang

hi, i'm having an issue with moving my photos and videos file into folders based on DateTimeOriginal. Some files weren't moved, i think due to missing the tag.  I saw another thread related to renaming files that Phil suggest a single command line that will renaming the files with another tag if tag is missing.

exiftool -P -d '%Y-%m-%d %H.%M.%S' \
    '-filename<${DateTimeOriginal}_${Make;}.%e' \
    '-filename<${CreateDate}_${Make;}_${Model;}.%e' \
    '-filename<${DateTimeOriginal}_${Make;}_${Model;}.%e' \
    $@


I wonder if i can do the same with moving command, i.e., a single command line that will move the files into folders based on DateTimeOriginal, if there is no DateTimeOriginal tag, it will move based on CreateDate and then FileModifyDate.

Phil Harvey

Yes.  You can do the same thing with Directory as you can with FileName in your example command.  (Or any other writable tag for that matter.)

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