Feature request: add a variable for target folder name

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

What I would LIKE to do is move files to a subfolder based on the creation date of the file.
Primary folder names would be yyyy.
subfolders would be 01-12 but preferably with the spelled-out month as part of the name.
So, 01 January, 02 February, 03 March, etc.
This would appear to also require an array to accomplish easily.
It could be even more powerful if subfolders, if they do not already exist, could be created,
although that is a MINOR issue!
AS I envision it, it would be necessary to SET the variable name USING the date created.
Exactly HOW this would work as Hazel currently creates rules, I'm not sure.
Since the target folder is a FIXED item during rule creation (navigate to and open)
I don't see how this could be implemented dynamically.
If, during rule creation, the parent folder could be 'opened' into a variable and the target folder
dynamically specified as <parentvar>'>'<subvar> and THEN opened for the move...??
OK. I WAS a programmer. I suppose I'm just being annoying!
If so, my apology!!! :-(
paulhubert
 
Posts: 12
Joined: Tue Jun 14, 2016 2:21 pm

OK, it may get squirrleier (to coin a word?) - another approach would be to
add the ability to CHAIN rules -
That is, to RUN a sub-rule from within a rule.
If date-created (date format edited) is yyyy01 run subrule <name>
Eliminates the need for the array or dealing with variable filenames.
paulhubert
 
Posts: 12
Joined: Tue Jun 14, 2016 2:21 pm

Oops. Omitted this:
Clearly such sub-rules would never be executed automatically.
paulhubert
 
Posts: 12
Joined: Tue Jun 14, 2016 2:21 pm

Have you tried the "Sort into subfolder" action with "date created" as the pattern? After adding the date created, you can click on it to edit its format to only show the year and month.
Mr_Noodle
Site Admin
 
Posts: 9709
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion