Delete duplicate in root folder, but keep in subfolder
Hi everyone,
I’m trying to set up a Hazel rule but I can’t get it to work and could really use some help.
What I want to achieve:
I have a main folder with multiple subfolders. Sometimes the same file exists both in the main (root) folder and in one of the subfolders.
My goal is:
• If a file exists in both the root folder and any subfolder,
→ delete (or move) the one in the root folder
• but always keep the version inside the subfolder
Important:
• Only files in the root folder should be affected
• Files inside subfolders should never be deleted or modified
• Matching by filename is sufficient for my use case
I haven’t been able to figure out a reliable way to do this in Hazel and I’m a bit stuck.
Is there a clean way to achieve this with Hazel rules, or would I need to use a script? If a script is required, I’d really appreciate a simple example and how to set it up correctly in Hazel.
Thanks a lot in advance!
I’m trying to set up a Hazel rule but I can’t get it to work and could really use some help.
What I want to achieve:
I have a main folder with multiple subfolders. Sometimes the same file exists both in the main (root) folder and in one of the subfolders.
My goal is:
• If a file exists in both the root folder and any subfolder,
→ delete (or move) the one in the root folder
• but always keep the version inside the subfolder
Important:
• Only files in the root folder should be affected
• Files inside subfolders should never be deleted or modified
• Matching by filename is sufficient for my use case
I haven’t been able to figure out a reliable way to do this in Hazel and I’m a bit stuck.
Is there a clean way to achieve this with Hazel rules, or would I need to use a script? If a script is required, I’d really appreciate a simple example and how to set it up correctly in Hazel.
Thanks a lot in advance!