Feature Request: Recreate Move Destination Folder

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

Moderators: Mr_Noodle, Moderators

I'm using Hazel 6.

I'd really like it if I could specify in a rule if I want Hazel to recreate the move destination folder if it doesn't exist and then finish the rule action.

Right now I have to manually recreate the destination folder if it gets deleted and Hazel will just generate errors until I do so every time it executes a rule with a move to that destination.
Aric
 
Posts: 4
Joined: Wed Oct 23, 2024 2:58 pm

Why is the folder always being deleted?

Note that the Sort into subfolder action does create folders as needed if you can re-work things to use that instead.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

It’s not getting automatically deleted. It got deleted because I did a clean install of the os and restored the settings for Hazel from backup. It also happens if I manually go and delete the folder. Hazel should just recreate the folder if it has access to the location.
Aric
 
Posts: 4
Joined: Wed Oct 23, 2024 2:58 pm

Since this seems to be a one-time thing, not sure if it makes sense to make it standard behavior. A missing destination usually indicates a bigger issue that needs to be addressed.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

If you already create folders when you do the sort command, I'm not really sure I understand your reason for letting move act completely differently. Hazel failing with an error should only ever be a last resort. If Hazel already has write privileges in the location, it takes very little effort for it just to do what the user asked rather than soft erroring and hoping the user notices the issue.

Anyway, thanks for taking the time to respond.
Aric
 
Posts: 4
Joined: Wed Oct 23, 2024 2:58 pm

The notion here is that the destination should be a stable location. If you use Sort, you have a known starting point.

Suppose you had a destination of /Volumes/SomeDrive/somefolder and /Volumes/SomeDrive is gone? Where do you create somefolder? At the root of your main drive? Not a good idea (if it's actually allowed by permissions).
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

But even with sort, the destination isn’t guaranteed to be stable. A drive can disappear, become write only, or become corrupted even in the middle of an operation. How does sort handle that? I assume the os generates an error and then you report it to the client (in the logs in this case). Move can handle it similarly to sort. If the destination doesn’t exist, create the folder in the original path. If that completes, great, finish the rule action. If not, then error out because in that case human intervention is required.

In any case, thanks for considering this.
Aric
 
Posts: 4
Joined: Wed Oct 23, 2024 2:58 pm

Sort starts from a known place, otherwise, the rule wouldn't match in the first place.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion