I already tried different things with Hazel, but one of my main usage for me does not work until now. I want to compress certain files and move them to a different directory. Sounds simple? Well I thought it was, but it isn't or I am not seeing things through

I have a folder, lets call it 'Test'. Underneath Test we have several folders called 1,2,3,4 and 5. I am watching the folder Test and set up a rule to execute a shell script that compresses a file if it was added to one of those five folders today. What happens now is that Hazel matches the file in folder 5, but does not compress only that file but also tries to compress the whole folder 5. How can I tell Hazel that it should process only the matched file?
Also I get the following error with my script...it runs fine running manually from Terminal.app though.
- Code: Select all
2012-08-25 21:54:34.355 hazelworker[14960] [Error] Shell script failed: Error processing shell script on file /Test/5.
2012-08-25 21:54:34.355 hazelworker[14960] Shellscript exited with non-successful status code: 1
Anybody knows a way around this? Help would be much appreciated!