I have this applescript that takes the selected item and zips up this file / folder and uses the name as the zip name. The problem is that when I unzip the zip code, it creates a folder structure all the way from the user. Like this:
Users:
username:
folder:
folder:
I just would like to:
folder:
Here is the code:
tell application "Finder"
set theItem to selection 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 -r " & zipFile & " " & itemPath
end tell
source
share