Sort in Subfolders

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

Moderator: Mr_Noodle

Sort in Subfolders Fri Apr 14, 2023 12:05 pm • by Rivederlestelle
Hi again, Mr Noodle
I've been thinking about a simple rule for a few days but I can't find the solution.
I have searched the forum for all the threads about working with subfolders, I have read several times the chapter on subfolders and also on nested rules, I have made many attempts but I do not get the desired result.
It is as simple as moving a file whose name always maintains the same structure 1111-11A 1.pdf (example: 1234-23T 1.pdf) into the PDF subfolder of a folder whose name matches the first part of the file name ( example: 1234-23T anything)
The rule I have created works exactly as I want but only when the folder is in the root directory (ex: DROPBOX--->1234-23T anything--->PDF). but not if the folder is in a deeper level (ex: DROPBOX--->TRABAJOS--->2023--->04 Abril--->1234-23T anything--->PDF).
My question is is there a way to get Hazel to do a name matching search not only in the root directory but in all subfolders?

This is the rule I have created:
https://www.dropbox.com/s/b53f5vqhvvlggbt/Captura%20de%20pantalla%202023-04-14%20a%20las%2017.07.23.pdf?dl=0

ant this is the Directory:
https://www.dropbox.com/s/ef5tt8gjmf8vkdw/Directorio.pdf?dl=0

Compared to the doubts that I read in this forum, I know my question is very elementary... I know that I can solve it in a much more complex way by creating a rule for each month of the year... but I am sure that there is a much easier for this simple rule to work.
Can you help me?
Rivederlestelle
 
Posts: 11
Joined: Thu Jan 12, 2023 4:44 am

Re: Sort in Subfolders Mon Apr 17, 2023 3:47 am • by Mr_Noodle
What do you want to do if you encounter that file in a subfolder? It would seem like putting it into a deeper subfolder would cause a loop which would be a minor disaster.

If you want to always have the created folders at the top level, then that's a different thing. You would need to move the file to the monitored folder and then sort into subfolder from there. You also should prevent Hazel from going into that subfolder to prevent it from re-filing those files over and over.
Mr_Noodle
Site Admin
 
Posts: 11226
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Sort in Subfolders Wed Apr 19, 2023 3:39 am • by Rivederlestelle
Good morning Mr Noodle,

surely I have not been able to explain myself correctly, on the one hand for being an amateur and on the other for using google translator to translate my conversation.
My wish is that a file whose name begins with a code (2530-23T 1) and with the extension PDF is placed in a subfolder (usually at a depth level 4) whose name begins with the same code (2530-23T ANYTEXT) and once found it is placed in the PDF folder.
In other words, I would like Hazel to search several depths until she finds the matching folder.
Following the order of my screenshot, the rule that I have created works perfectly if the file is placed in the subfolder 04 APRIL, but it does not work if I leave it in a higher level.
I know I'm missing some key concept, but I don't know which one.
I leave you a new screenshot
https://www.dropbox.com/s/bc33q6qnj6ty4n9/New%20example.pdf?dl=0
Rivederlestelle
 
Posts: 11
Joined: Thu Jan 12, 2023 4:44 am

Re: Sort in Subfolders Wed Apr 19, 2023 9:08 am • by Mr_Noodle
Hazel won't be able to search an arbitrary folder hierarchy for your folder. You will need to point it to that folder somehow. The date on the file doesn't seem to match the date of the folder hierarchy. You would need some way of associating the two.
Mr_Noodle
Site Admin
 
Posts: 11226
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Sort in Subfolders Thu Apr 20, 2023 4:38 am • by Rivederlestelle
Thank you very much for your answer Mr Noodle,
it was what I imagined... surely I will be able to point the files in the folder that I need; I create a new folder every month, so by creation date I can easily solve it.
Rivederlestelle
 
Posts: 11
Joined: Thu Jan 12, 2023 4:44 am


Return to Support

cron