Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Automate files into folders by month

I'm running 17 time lapse cameras. Each camera takes a photo every 15 minutes, and uploads it into a Dropbox folder so my client can see / access.


I'd like to run an automator script that puts files into different folders depending on the filename:


20220304071500.JPG


(2022 03 04 07:15:00)


So I'd like the script to be able to read the 5th and 6th characters which will be the month on every file I have, and put them into a folder of the same number


If it could create that folder, even better... there are 599,000 images for me to sort and the project is ongoing :-|


Any help would be appreciated

iMac Pro

Posted on Jul 6, 2022 4:15 AM

Reply
Question marked as Best reply

Posted on Jul 6, 2022 8:52 AM

Use a zsh shell script, such as zsh with zmv (use zmv -n to start!) to move the files:

https://benfrain.com/batch-rename-nested-files-and-folders-on-macos-with-zsh/

https://blog.smittytone.net/2021/04/03/how-to-use-zmv-z-shell-super-smart-file-renamer/


Or use Finder’s batch-rename support:

https://tidbits.com/2018/06/28/macos-hidden-treasures-batch-rename-items-in-the-finder/

Similar questions

1 reply
Question marked as Best reply

Automate files into folders by month

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.