I'm trying to use Hazel to automatically backup a USB stick whenever it is inserted, but it's not quite doing what I'd like.
Here's how I have it set up:-
• add the USB stick to the monitored folders list
• for the stick, have a rule which matches when file pathname starts with /Volumes/USBSTICK
• when the rule matches, run a shell script:-
rsync -avh --modify-window=1 "$1" "/Users/mark/Backups$1"
What this does, is iterates through each folder at the root of the USB stick, and backs each up. However, I'd rather just have it run the shell script once for the root of the USB stick (otherwise folders/files at the root which are deleted on the USB stick still remain in the backup).
Is there some way to get Hazel just to run on the root of the USB stick (e.g. if I could just have Hazel monitor /Volumes/ that should do the trick)? Or is there a different and better way to do this?
Thanks,
mark.