Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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

Posted on Nov 11, 2018 6:03 PM

Reply

Similar questions

1 reply

how to delete all objects in a folder with applescript

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.