I want to group files by folder depending on date added.

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

Moderator: Mr_Noodle

I have a bunch of folders in a main folder. I want to sort all of these folders into folders in the same 'main' folder according to their date created.

I think I came up with the rule : Image

However this is wrong I believe. How do I make sure all the folders get sorted into their respective subfolders, how do I match all of these folders and make this rule work correctly?

Thank you for any help.
nikivi
 
Posts: 39
Joined: Tue Mar 08, 2016 10:04 am

I can't see the condition of the rule as it is obscured, but the Sort part will sort whatever matches into a folder with the two digit year and the month. Note that the slash is treated as a literal slash. If you are trying to add another folder underneath, then use the path separator token (the triangle pointing right).
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I see now. Thank you for providing help.

Essentially I have a folder of different folders. I want to sort this folder so it would automatically put the folders into subfolders according to time added. So let's say I have a folder of 10 folders, in these folders, there are 3 that are lying there from last month that I downloaded, I will want these folders to be put into subfolder with name '16/august' since I downloaded these folders last months. The other folders will be put into '16/september' because I got them this month. I also want to put a temporary rule so that this rule won't be activated for new folders coming in, only after the date created for that file has passed one day (these are so called 'currently working on' folders) (this part I think I can do, the latter, I don't know how).

Please help me make something like this, it would be really great. I am really new to Hazel and I am thinking of ways I can try and use it fit into my own workflow. This one would be really useful to have. Thank you for any help.
nikivi
 
Posts: 39
Joined: Tue Mar 08, 2016 10:04 am

I think your rule should be fine. The only thing I'd change is possibly adding a condition to filter out the dated folders you are created (so that Hazel doesn't try filing those into another folder).
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:I think your rule should be fine. The only thing I'd change is possibly adding a condition to filter out the dated folders you are created (so that Hazel doesn't try filing those into another folder).


This seems to work, thank you. Although I am not sure what you mean by 'adding a condition to filter out the dated folders you are created (so that Hazel doesn't try filing those into another folder'.

How do I do that?

Also is there a way to match and sort existing folders that I have in my 'research' folder according to the same rules?

Thank you for any help.
nikivi
 
Posts: 39
Joined: Tue Mar 08, 2016 10:04 am

While Hazel has some loop detection, sometimes it's safe to add a condition so that the folders that that rule creates don't end up matching that rule, resulting in a loop where the folder keeps getting filed into subfolders over and over. You can match on the date format in the name.

I'm not sure what you mean by your last question. Doesn't the current rule handle that?
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:While Hazel has some loop detection, sometimes it's safe to add a condition so that the folders that that rule creates don't end up matching that rule, resulting in a loop where the folder keeps getting filed into subfolders over and over. You can match on the date format in the name.

I'm not sure what you mean by your last question. Doesn't the current rule handle that?


I think I understand now what you mean. Yeh it works with sorting but there is a bug where it sorts subfolders too.

How do I do this match on date format? Do I need to match sub-files or what? (https://i.imgur.com/85LicxJ.png)

Thank you for any help. This is such an incredible tool. I am trying to come up with more uses to fit it into my own workflow.
nikivi
 
Posts: 39
Joined: Tue Mar 08, 2016 10:04 am

You'd need to use "Name matches". Check the help on how to use match patterns.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support