I am attempting to use Xcode and AppleScript-objC to zip a folder containing some network test files but get an error on this section of code.
set homeFolder to (path to home folder)
set homeDesktop to (POSIX file (POSIX path of homeFolder & "/Desktop/NetworkTestResults/"))
tell application "Finder"
set theItem to homeDesktop 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 -jr " & zipFile & " " & itemPath
end tell
The error text is "Can't make <> into type alias. (error -1700)
Any thoughts on how to correct/work around this?
Thanks for the assist.