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

Delete from desktop (won't allow)

tell application "Finder"

delete (folders of desktop whose name does not start with "key" or name does not start with "Hot")

end tell



How comes this won't work? It should delete everything on my desktop except the folders Hot and key.


Says they can't as its owned by the system?

iMac, Mac OS X (10.6.8)

Posted on Mar 6, 2013 5:01 AM

Reply
30 replies

Mar 7, 2013 1:58 AM in response to Frank Caggiano

This is what I am using, just practicing on the one folder


tell application "Finder" of machine "eppc://StudioB:PSW@StudioB.local"

(folder of desktop whose name starts with "IVON")

end tell


the error is

error "Can’t get folder of desktop of application \"Finder\" of machine \"eppc://StudioB:PSW@StudioB.local\" whose name starts with \"IVON\". Access not allowed." number -1723



Check the Remote Apple events, enabled on both machines, and all users is selected.

Mar 7, 2013 2:17 AM in response to MattJayC

Also tried this


tell application "Finder" of machine "eppc://StudioA:PSW@StudioA.local"


activate

end tell


(This is my own computer)and it works


add the line

(folder of desktop whose name starts with "IVON")


and then this

Result:

error "Can’t get folder of desktop of application \"Finder\" of machine \"eppc://StudioA:PSW@StudioA.local\" whose name starts with \"IVON\". Access not allowed." number -1723


Looks like there is something odd about the action I am asking it?

Delete from desktop (won't allow)

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