小编Nay*_*eth的帖子

如何在AppleScript中将文件移动到垃圾箱?

我知道它是一个愚蠢的问题但不知何故我输入的命令不起作用

set deleteFile to srcTemp & "Archive.zip"
--deleteFile path is something like this /Users/home/Desktop/Archive.zip    
tell application "Finder"
    move POSIX file "" & deleteFile & "" to trash
    --move file "\"" & destNoQuote & "Archive.zip\"" to trash
    empty the trash
end tell
Run Code Online (Sandbox Code Playgroud)

但我得到一个错误,说无法找到POSIX文件.

macos applescript

1
推荐指数
1
解决办法
3968
查看次数

标签 统计

applescript ×1

macos ×1