Created
March 19, 2014 16:25
-
-
Save dublado/9645440 to your computer and use it in GitHub Desktop.
Create zip one per file with password - input this at automator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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