How to remove archive directory in Zipit???

reneregal

Registered
I've zipped a folder of files in Zipit and sent it to a PC user. When she opens it on her PC, it shows an archive directory. (I don't see this directory on my MAC, just the files). How do I remove or turn off this archive directory. I can't have that in the .zip file.

I get these weird directory files too with Stuffit and the Mac OSX zip utility.

Thank you!
 
secondary question as I ponder this problem some more....

If I can't remove the archive directory or turn it off in Zipit or another Mac compression software.. Can I use VirtualPC to run Winzip and zip my files that way? Would this be like I was zipping on a PC (thus eliminating the archive directory??)???

I hate VirtualPC, but maybe version 7 has gotten better with OSX.
 
This seems to be more complicated than it needs to be.

I've solved the problem in the past by uploading the folder to a Linux server and doing the zipping there but here's a method for avoiding that.

The Create Archive tool in the Finder is apparently different than the zip command in Terminal (Unix command line)

So create your folder, say test_zip (I'll assume this is on the Desktop). Copy the files you wish to send into it.

Now in Terminal type cd Desktop, (hit return) then ls (that's lower case L) hit return.

You'll get a listing of the files and folders on the Desktop. Type cd test_zip (hit return) then type ls -a (shows hidden files) (hit return).

If you see any files starting with ._ you can remove them by typing...

rm ._*.* (hit return)

Typically there will be a .DS_Store file in there

There's an automatic way to do all this using Blue Harvest http://www.zeroonetwenty.com/blueharvest/

There's a pane in there with a Cleaner Function (See the tab). If you drag your folder onto the arrow it will "cleanse" the folder of the ._ files.

You're not done yet though, you still need to zip the file.

Move back up one level to the Desktop (type cd .. return)

Then type zip -r test_zip test_zip (hit return)

and you'll end up with a nice clean zipped archive named test_zip.zip.

Whew! There's gotta be an easier way. But this is actually pretty simple once you understand it.

I have tested this and once I unzip the test_zip.zip archive on the web server it is indeed clean of all the junk.
 
If you use the Finder's Archive tool to do the zipping you'll end up with unneeded garbage like this:

~/test > unzip xxxx.zip
Archive: xxxx.zip
creating: xxxx/
inflating: xxxx/.DS_Store
creating: __MACOSX/
creating: __MACOSX/xxxx/
inflating: __MACOSX/xxxx/._.DS_Store
inflating: xxxx/060221_2 copy 1.jpg
inflating: __MACOSX/xxxx/._060221_2 copy 1.jpg
inflating: xxxx/060221_2 copy 2.jpg
inflating: __MACOSX/xxxx/._060221_2 copy 2.jpg
inflating: xxxx/060221_2 copy.jpg
inflating: __MACOSX/xxxx/._060221_2 copy.jpg
inflating: xxxx/zip_again.zip

These ._ files may or may not be useful if the folder contains files which will be used on another Mac. They're useless on other systems as is the __MACOSX folder itself.

I'm very familiar with these files since I'm constantly copying files up to the web servers. I've mostly got their elimination automated when using various clients but there's always one or the other that sneaks through for whatever reason.

For them I have a php "search and destroy" script. ::evil::
 
Ah Hah!

I just tried with Cocoazip ( http://www.macupdate.com/info.php/id/16149 )

and it seems to create an archive as clean as the command line zip. (probably uses it in fact)

So there's an alternative. I'd still use BlueHarvest to make sure no ._ files sneak into the folder though.

edit: The BlueHarvest cleansing is important. I nested folders, xxxx/yyyy/zzzz/testfile.txt then zipped it. I ended up with the pesky .DS_Store files in each folder and they'll be zipped up by Cocoazip to be unzipped at the other end.

The BlueHarvest cleaner will rip them out. Or use terminal to delete them.
 
Back
Top