Last active
February 9, 2025 22:34
-
-
Save drguildo/43a46d7d18de53e57a5f6f1b53ee5e37 to your computer and use it in GitHub Desktop.
A batch file for automatically renaming and organising images and videos into folders by date.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Use exiftool -s <filename> to list the tag names available for a file | |
REM Google Photos uses these if it doesn't find any metadata (and it doesn't do | |
REM a good job of looking). | |
exiftool "-FileCreateDate<DateTimeOriginal" "-FileModifyDate<DateTimeOriginal" *.* | |
exiftool "-Directory<DateTimeOriginal" -d "%%Y/%%B" *.jpg *.mp4 *.mts *.m2ts *.mov | |
exiftool "-Directory<CreateDate" -d "%%Y/%%B" *.jpg *.mp4 *.mts *.m2ts *.mov | |
exiftool "-Directory<CreationDate" -d "%%Y/%%B" *.wmv | |
REM Fallbacks in case we failed to match any metadata | |
exiftool "-Directory<FileCreateDate" -d "%%Y/%%B" *.jpg *.mp4 *.mts *.m2ts *.mov *.wmv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment