我正在尝试使用Xcode和AppleScript-objC压缩包含某些网络测试文件的文件夹,但在此部分代码中出错。
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
错误文字是"无法生成<>到类型别名。 (错误-1700)
有关如何纠正/解决此问题的任何想法?
感谢您的帮助。