Re: If folder does not exist ...
Re: If folder does not exist ...
- Subject: Re: If folder does not exist ...
- From: JollyRoger <email@hidden>
- Date: Tue, 11 Jun 2002 18:29:39 -0500
On 6/11/2002 3:36 PM, "Charles Heizer" <email@hidden> wrote:
>
Hello,
>
>
This is a Mac OS 9 question...
>
>
I want to do a "does not exists" is this posssible ?
>
>
If folder "MyFiles" of startup disk does not exist then
>
>
make folder "MyFiles"
>
>
else
>
>
-- continue with my script
>
>
end if
I find it interesting that nobody mentioned a way to do this WITHOUT the
Finder:
-- begin script
set testFile to (the path to the startup disk as text) & "untitled folder:"
if my FileExists(testFile) then
display dialog "The folder exists."
else
display dialog "The folder does not exist."
end if
on FileExists(someFile)
try
set anAlias to (someFile as alias)
return true
on error
return false
end try
end FileExists
--end script
In many cases, asking the Finder to do something is much, much slower than
the alternative.
HTH
JR
_______________________________________________
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.