Sometimes, when uploading photos from my iPhone’s camera roll (for example, when using Dropbox), the photo filename format ends up looking like this:
This isn’t very nice. Much better to have something in ISO-8601 format, which sorts nicely in file listings, and so on. So I wrote a quick bash script to search for all the files in the current directory (and subdirectories), and rename them to this style:
Please note that the script renames files immediately, with no confirmation. It depends on Perl’s rename under the covers, and if you pass in the
-n flag, it does a dry run so it shows you the renames that would be done, but doesn’t actually do them.
(It also handles video files with similar names).