Removing __MACOSX from Zip Files

Hello,
I am trying to use the following script to remove the "__MACOSX" files from zip files. These files show up in the zips when seen in Windows and creates some problems with an application there.
The script I am using is fairly simple. I have run it in Terminal and it works.
Each time I run it, I get:
2014-10-19 14:12:00.534 hazelworker[22537] [Error] Shell script failed: Error processing shell script on file Chronicles 001.zip.
2014-10-19 14:12:00.534 hazelworker[22537] Shellscript exited with non-successful status code: 12
I have tried the following:
1. /usr/bin/zip in the command. Just to make sure it was finding zip.
2. Uninstalled and re-installed Hazel for all users. I had read this might help.
3. Variations of the string to remove. The different variations work in Terminal, but not in Hazel
4. Changing the shell. I've used bash and sh so far.
Regardless, none of the things I am trying have worked. Any suggestions would help.
I am trying to use the following script to remove the "__MACOSX" files from zip files. These files show up in the zips when seen in Windows and creates some problems with an application there.
The script I am using is fairly simple. I have run it in Terminal and it works.
- Code: Select all
zip -d $1 \*__MACOSX*
Each time I run it, I get:
2014-10-19 14:12:00.534 hazelworker[22537] [Error] Shell script failed: Error processing shell script on file Chronicles 001.zip.
2014-10-19 14:12:00.534 hazelworker[22537] Shellscript exited with non-successful status code: 12
I have tried the following:
1. /usr/bin/zip in the command. Just to make sure it was finding zip.
2. Uninstalled and re-installed Hazel for all users. I had read this might help.
3. Variations of the string to remove. The different variations work in Terminal, but not in Hazel
4. Changing the shell. I've used bash and sh so far.
Regardless, none of the things I am trying have worked. Any suggestions would help.