Re: If exists logic
Re: If exists logic
- Subject: Re: If exists logic
- From: Michelle Steiner <email@hidden>
- Date: Fri, 6 Jun 2003 09:43:14 -0700
On Thursday, June 5, 2003, at 02:49 PM, Jeff Grossman wrote:
How do I get the following code to work on OS X 10.2.6?
if (file "OSX:List Addresses:Fishads Addresses") exists then
tell application "Finder"
select {file "Fishads Addresses" of folder "List_Addresses" of
disk
"OSX"}
delete selection
end tell
end if
You need to put the entire thing within the "tell finder" wrapper:
tell application "Finder"
if exists file "Dora:Documents:directions.txt" then
select {file "Dora:Documents:directions.txt"}
delete selection
end if
end tell
But why select and delete selection instead of deleting the file
directly?
tell application "Finder"
if exists file "Dora:Documents:directions copy.txt" then
delete file "Dora:Documents:directions copy.txt"
end if
end tell
--Michelle
--
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.