how to delete all objects in a folder with applescript
I want to write an applescript to delete all objects in a folder.This is what i wrote:
tell application "Finder"
deletefiles in folder "/Users/sun/Documents/archive"
end tell
But is didn‘t work ,the error :
error "“Finder”Encountered an error: cannot getting“folder \"/Users/sun/Documents/archive\"”。
error "“Finder”遇到一个错误:不能获得“folder \"/Users/sun/Documents/archive\"”。
iMac, macOS Mojave (10.14.1), null