Is it possible: Automator workflow for date based file import

automatorimportphotosvideo

I'd like to know if the following is possible with Automator.

I want to be able to move any files, but in my special case videos and photos, from any possible device ( iPhone, iPad, SD card, but perhaps also from other directories) to my NAS, ordered by date.
Each file type should have a separate directory, eg.

NAS://imported/video 
NAS://imported/photos 

What it should also do: within those separate directories, there should be a folder for each date a photo or video will be moved to(and it would also be important that you can customize the date format to yy-mm-dd , dd-mm-yy or the like, before you run the workflow )

NAS://imported/video/2014-11-04 
NAS://imported/video/2014-11-05 

Now every video made on november the 5th should be moved to NAS://imported/video/2014-11-05/video_file1.mp4

I know that it is no problem to move files by type into certain folders, but I dont know how to create date-specific folders for each file before the move-command….

I'm on MacOS 10.10 (Yosemite)

Best Answer

This will be difficult with Automator but it is possible. You will need to augment your Automator workflow with Run Script steps involving some other scripting language. That language can be shell script, AppleScript, or another command line capable tool such as perl.

Alternatively, you may find a third party tool like Hazel is able to help:

Hazel watches whatever folders you tell it to, automatically organizing your files according to the rules you create. It features a rule interface similar to that of Apple Mail so you should feel right at home.