Automator - dynamic folder creation and traverse
Hello all,
I am trying to automate screenshot creation.
Workflow I need:
Screenshot all the monitors
Set the proper name to include time
and save it to a folder structure dynamically created by current date.
So basically the idea of the workflow from the technical perspective is:
1) Check, if year folder exists, if not, create it
2) Traverse inside, check if month folder exists, if not, create it.
3) Traverse inside, check if day folder exists, if not, create it.
4) Traverse inside, save the picture there.
5) Delete everything past XXX days (so far, optional)
But I have hit some limitations that I need helping with:
I have figured out the variables. Nice, I can have e.g. current day and create a folder with that name. However, the folder does not exist, so the next step, where I need to create another folder seems to be impossible, because I cannot select the folder that does not exist. I tried to even create a new variariable, but to that popup, you cannot drag/drop the existing variables to the chain.
Same for the picture, where I need to select where to store it, but as the folders does not exist yet, I cannot select the destination.
Other thing is, I don`t see any option for checking, if the folder already exists, so the system won`t try to create a duplicate folder each time the workflow runs. Even in the Automator app, there seems to be no condition, only action after action approach.
Any ideas here, please?
Thank you!
MacBook Pro