Variable Destination Folder?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Variable Destination Folder? Tue Feb 26, 2019 11:09 am • by codyn
Hi,

I'm trying to automate the process of sorting photos from my iCloud Photos Library into folders for a report I have to do each quarter. Here are the basic steps to what I'm trying to accomplish:

  • Create folder structure for quarterly report as ultimate destination
  • Download photos from the past quarter from my iCloud Photos library to a staging (or 'Action') folder
  • Rename the photos with the correct naming scheme
  • Move the renamed photos to the folder structure destination

So I have an Automator calendar event set to create this new folder structure every 3 months for me. The problem is, how do I create a Hazel 'move' rule pointed to this destination folder if it hasn't been created yet? Let's assume that I'll have this rule run after the destination has already been created. Is there a way to set up a variable destination of sorts somehow?

If I need to explain further let me know, happy to do so.
Thanks,

Cody
codyn
 
Posts: 3
Joined: Tue Oct 09, 2018 3:56 am

Re: Variable Destination Folder? Tue Feb 26, 2019 11:28 am • by Mr_Noodle
What's the actual folder structure? The Sort into subfolder action does take a pattern but without knowing the actual structure, I can't really say more.
Mr_Noodle
Site Admin
 
Posts: 11251
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Variable Destination Folder? Tue Feb 26, 2019 11:37 am • by codyn
The Automator Calendar Alarm creates this:

YYYY-MM-DD_Report

I'd then like to take the photos that Hazel sorts and put them into the above folder as such

YYYY-MM-DD_Report/Photos/Kids Program

But with multiple folders in the Photos folder, such as 'Kids Program', 'Youth Day', 'Elderly Day', etc. I'm working to sort each of these groups of photos individually, and then take each respective event folder (full of photos) and place them into the YYYY-MM-DD_Report folder.
codyn
 
Posts: 3
Joined: Tue Oct 09, 2018 3:56 am

Re: Variable Destination Folder? Tue Feb 26, 2019 2:51 pm • by Mr_Noodle
How do you determine which folder the file goes into? Is there something about the file (like the name) that would indicate that it goes into the "Youth Day" folder or is it something a human needs to determine?
Mr_Noodle
Site Admin
 
Posts: 11251
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Variable Destination Folder? Wed Feb 27, 2019 6:27 am • by codyn
I have a Keyboard Maestro macro that runs an Automator application which exports the photos from each event from a top-level album into an 'Action' folder which Hazel watches. Hazel then renames the files and places them into a correctly named subfolder. It's what to do after this that's my question, how can I put that subfolder (ex. 'Youth Day') into the folder structure that will be created when it may not have been made yet, and will be different each quarter.

Attached are some screenshots of what I have so far. I realize this is a forum for Hazel, so I'm trying to keep my questions specific to it. I'm ultimately trying to automate as much of this process as possible. Just trying to tackle one step at a time :)

https://drive.google.com/file/d/1YxxxlFPFKjAXkI_Yhnb7CBicM9kgnX2n/view?usp=sharing
https://drive.google.com/file/d/1LhJ1_UsZfpukmA75bxIXgkCcglDNA_65/view?usp=sharing
https://drive.google.com/file/d/1i-IBozWAV_gxwbmY-VjvVV9NV9-vQxI6/view?usp=sharing
https://drive.google.com/file/d/1YtG5en7s26gUMycTQcEQq8hv_9CDBB2U/view?usp=sharing
https://drive.google.com/file/d/1ETZU4Z6EPykwDBjCOk0ltrcN-m1TD860/view?usp=sharing
https://drive.google.com/file/d/1mmJwN7mFNg6iVQnWn2fltguDpyMOznHX/view?usp=sharing
codyn
 
Posts: 3
Joined: Tue Oct 09, 2018 3:56 am

Re: Variable Destination Folder? Wed Feb 27, 2019 8:48 am • by Robert
Just one short thought: You could have one folder called "current quarter" which is obviously always the current quarter. And then have Hazel change that folder every quarter to f.e. 2019Q1 when the quarter is over and create a new folder "current quarter". With this I presume that hazel will move the Folder 'Youth Day' always in the "current quarter" folder...
But maybe there is a more elegant way of achieving this...
"Behind all the inhuman aspects of automation (...) its real possibilities appear: the genesis of a technological world in which man can finally withdraw from (...) the apparatus of his labor – in order to experiment freely with it." /Marcuse
Robert
 
Posts: 52
Joined: Sun Dec 16, 2018 8:05 am

Re: Variable Destination Folder? Wed Feb 27, 2019 11:47 am • by Mr_Noodle
Right, so if your problem is the folder containing Youth Day, and not that folder itself, if you want to create folders by quarter, that should be doable by Hazel. Figure out which date in the file's metadata that you want to base the quarter on and use that date in the Sort into subfolder pattern. You can edit the date format to only include the quarter.
Mr_Noodle
Site Admin
 
Posts: 11251
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support