Greetings all;
I'm trying to create a set of rules that will delete the backup of Pages docs that are created automatically. After some frustration, I managed to get it to work by creating a rule that simply fires off at a particular time and calls a shell script that does the following:
find ~/Documents/ -name "Backup of *.pages" -print0 | xargs -0 -I {} rm -rf {}
Which simply does a find on all files with Backup of <something>.pages and then does an rm -rf. I set that to fire off based on a schedule and that actually does accomplish what I'm after.
However, this was the solution I came up with after I couldn't get Hazel to find files. Here are the conditions I used:
Name Contains backup of
Kind Is Pages Document
Date Modified Is Not In The Last 1 Hour
As a test, I just had it apply a blue label to the files but when I test it no results show up. I know I'm missing something subtle but I'm not sure what it is.
The shell script solution works and it is what I'm going to use because it is simple and fast but the geek girl in me just can't let it go that I'm not able to create the correct set of rules. Can anyone spot what I'm doing wrong trying to find these files using Hazel's internal criteria? Like I said, I have a solution that is elegant but I really want to be able to use Hazel to exclude one particular directory that is a child of ~/Documents but I need the criteria above to work in order for that to happen.
Thanks for your help.