Update folder last modified date based on subfolder changing

Hi - one of the Finder limitations that bugs me is that folders only update their last modified date based on files in it changing, not files in subfolders changing. I'd like to setup Hazel rules to fix that.
Structure:
Documents
Folder
Subfolder
File
When I modify File, I want the last modified date of Folder to be updated.
I added Documents to Hazel, then created two rules:
1. Rule to go into subfolders: If Kind is Folder then run rules on folder contents.
2. Rule to update date of parent folder (since file changes automatically update their folder date, I focus on folders): If Kind is Folder and date last modified is today, then run shell script, where script is:
dir=`dirname $1`
touch -m $dir
I figured that if I run this every day, then it should work. If I skip a day (see: weekend), then not so much, but at least it would be somewhere near the top of the Documents folder.
Except, it's not working. Any suggestions on what I'm doing wrong?
Structure:
Documents
Folder
Subfolder
File
When I modify File, I want the last modified date of Folder to be updated.
I added Documents to Hazel, then created two rules:
1. Rule to go into subfolders: If Kind is Folder then run rules on folder contents.
2. Rule to update date of parent folder (since file changes automatically update their folder date, I focus on folders): If Kind is Folder and date last modified is today, then run shell script, where script is:
dir=`dirname $1`
touch -m $dir
I figured that if I run this every day, then it should work. If I skip a day (see: weekend), then not so much, but at least it would be somewhere near the top of the Documents folder.
Except, it's not working. Any suggestions on what I'm doing wrong?