basatom.blogg.se

Get applescript editor
Get applescript editor









get applescript editor

It also will attempt to get a unique name for the final archive in case there is already a file with the chosen archive name. Here's a script which will combine multiple files into one archive.

get applescript editor

I figured why not just make it a droplet? Copy and paste the following into Script Editor and save it as an application: on open (theItems) -receive items dropped onto droplet as a list -incase you're trying to compress something really big on your Rev A iMac: with timeout of 1000000 seconds try tell application "Finder" -repeat the command to compress each item as an individual archive repeat with oneItem in theItems -used to extract the name and location of the file set itemProp to properties of oneItem -where the file is set itemPath to quoted form of POSIX path of oneItem -where the compressed file should end up set destFold to quoted form of POSIX path of ¬ (container of itemProp as alias) -what the name of the file is set itemName to name of oneItem -do it, do it now do shell script ¬ ("ditto -c -k -X -rsrc -keepParent " & itemPath & ¬ " " & destFold & "'" & itemName & "'" & ".zip") end repeat end tell on error errmsg -should anything go wrong let the user know display dialog errmsg end try end timeoutend open

get applescript editor

zip files and people were doing it with folder action scripts.

get applescript editor

I came across some hints on using the ditto command to create.











Get applescript editor