2013-11-21 72 views
1

我試着這樣做:AppleScript。如何刪除隱藏的文件夾或將其移至垃圾箱?

tell application "Finder" 
    move folder "Macintosh HD:Users:Mark:Desktop:.folder" to the trash 
end tell 

但是腳本編輯器會談約這樣的錯誤:

tell application "Finder" 
    move folder "Macintosh HD:Users:Mark:Desktop:.folder" to trash 
     --> error number -1728 from folder "Macintosh HD:Users:Mark:Desktop:.folder" 

附:對於我的英語不好,我感到抱歉。

回答

2

這將刪除該文件夾,你不會發現它在垃圾桶......

tell application "System Events" 
    delete folder "Macintosh HD:Users:Mark:Desktop:.folder" 
end tell 
相關問題