Skip to content

Instantly share code, notes, and snippets.

@ludwigtuerme
Created December 22, 2022 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ludwigtuerme/943ce5f946c7c5b8a36a435cf5ee2c29 to your computer and use it in GitHub Desktop.
Save ludwigtuerme/943ce5f946c7c5b8a36a435cf5ee2c29 to your computer and use it in GitHub Desktop.
exiftool script to move photos from one folder to another. organizes by the year/month/day folder hierarchy. works on macos, not windows.
#!/bin/sh
fromdir=""
todir=""
exiftool -d '%Y/%m/%d' '-Directory<'$todir'/$DateTimeOriginal' $fromdir
@ludwigtuerme
Copy link
Author

Phil Harvey has this quote as his signature on the forum:

On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

@ludwigtuerme
Copy link
Author

ludwigtuerme commented Dec 22, 2022

It does not work for mp4 files.

Don't use the FileName tag. Use the FileModifyDate tag instead.

@ludwigtuerme
Copy link
Author

Or the MediaCreateDate tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment