Page 1 of 1

A rule triggering on file deletion

PostPosted: Tue Aug 13, 2024 4:17 pm
by Graf_Wetter
Hi,
I need a rule that checks for monitoring reasons, if files are manually removed or deleted by a user.
I have a main folder that should be watched by hazel.
This folder contains several subfolders with changing names containing the single files.
A rule should be triggered as soon as one or many files in the subfolders are moved/deleted from it.
The deletion of the subfolders themselves should not trigger.
Is that possible ?
Thanks,
Jörg

Re: A rule triggering on file deletion

PostPosted: Wed Aug 14, 2024 8:30 am
by Mr_Noodle
Hazel doesn't match files when they are deleted but you can match a subfolder. If you match on date modified, that should catch any additions/removals from the folder.

Re: A rule triggering on file deletion

PostPosted: Wed Aug 14, 2024 8:52 am
by Graf_Wetter
yes, I know, but I only need to catch removals.
I´m thinking about a workaround with a "secret" folder copy of the watched folder. Then I check for changes on the watched folder as you suggested and trigger a script with each change to compare the number of files in both watched folder and folder copy.
If the number of files in the folder copy is higher than in the watched folder, someone deleted files.
Not very smart, but it could work.