0
我试图通过AppleScript在我的计算机上删除文件。当我应用下面的代码时,它似乎从桌面上删除文件。我想删除“/ Users/andrew/Documents”中的文件。这是低于该代码从桌面删除文件:Finder中的AppleScript设置目录路径
tell application "Finder"
if exists file "new.mp3" then
delete file "new.mp3"
end if
end tell
这是尝试和它不工作:
tell application "Finder"
if exists file "/Users/andrew/Documents/new.mp3" then
delete file "/Users/andrew/Documents/new.mp3"
end if
end tell
如果任何人都可以任何建议,将不胜感激!
非常感谢Lauri解决方案 - 非常棒! – andrew 2013-04-20 20:48:17