Skip to content

Instantly share code, notes, and snippets.

@dublado
Created March 19, 2014 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dublado/9645440 to your computer and use it in GitHub Desktop.
Save dublado/9645440 to your computer and use it in GitHub Desktop.
Create zip one per file with password - input this at automator
tell application "Finder"
set theItems to selection
repeat with _a from 1 to (count of theItems)
set theItem to (item _a of theItems) as alias
set itemPath to quoted form of (POSIX path of theItem)
set fileName to name of theItem
set theFolder to POSIX path of (container of theItem as alias)
set zipFile to quoted form of (theFolder & fileName & ".zip")
do shell script "zip -rj --password YOURPASSWORD " & zipFile & " " & itemPath
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment