Removing __MACOSX from Zip Files

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Removing __MACOSX from Zip Files Sun Oct 19, 2014 2:24 pm • by Gigamesh
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.

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.
Gigamesh
 
Posts: 4
Joined: Sun Jun 02, 2013 5:55 pm

Re: Removing __MACOSX from Zip Files Mon Oct 20, 2014 10:18 am • by Mr_Noodle
First thing, put double quotes around $1 as it will fail if there are any spaces in the path. If that doesn't fix it, turn on debug mode which will show any output from the script.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support