Re: Deleting Files With System Events
Re: Deleting Files With System Events
- Subject: Re: Deleting Files With System Events
- From: Christopher Stone <email@hidden>
- Date: Sun, 12 Dec 2004 22:32:32 -0600
Interestingly I seem unable to delete explicitly referenced items:
This fails:
tell application "Finder"
-- a single file
set f to selection as alias
end tell
tell application "System Events"
delete f
end tell
and this:
set f to alias "Lao-Tzu:Users:chris:Desktop:test:KateBosworth.jpg"
tell application "System Events"
delete f
end tell
On the other hand this works:
set fl to "Lao-Tzu:Users:chris:Desktop:test:"
set fn to "KateBosworth.jpg"
tell application "System Events"
delete file fn of folder fl
end tell
I wonder if this has anything to do with the fact that there are two
'delete' commands in System Events - one in the Standard Suite and one in
the Disk-Folder-File Suite.
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden