here’s another applescript solution to a missing functionality in OS X. inspired by a question on the MacWorld Forums which asks, basically, how do you easily compress multiple folders into multiple zip files? if you try to compress multiple files or folders in the finder you get a single archive containing them all. or you can select and compress each one individually. this can be a pain.
this script is based on one found at stackoverflow. but a couple of additions have been included :
• application saves as a droplet for drag-and-drop functionality
• invisible .DS_Store files are stripped out of the archive
--thanks to tim.g and Matthew H. for basic script : --http://stackoverflow.com/questions/4909337/zip-folder-using-applescript on open TheseItems repeat with thisItem in TheseItems tell application "Finder" set itemPath to quoted form of POSIX path of thisItem set fileName to name of thisItem set theFolder to POSIX path of (container of thisItem as alias) set zipFile to quoted form of (theFolder & fileName & ".zip") do shell script "zip -jr " & zipFile & " " & itemPath & "* -x *.DS_Store" end tell end repeat end open
copy the script into script editor and save it as an application.
or download ZipStuff as a finished app. – thanks to box.net
place the application in your sidebar. drag-and-drop stuff onto it. each individual item, be it folder or file, will be saved as its own zip archive.
easy peasy.