• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: If folder does not exist ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: If folder does not exist ...
      • From: Steven Angier <email@hidden>
    • Re: If folder does not exist ...
      • From: Michelle Steiner <email@hidden>
References: 
 >If folder does not exist ... (From: Charles Heizer <email@hidden>)

  • Prev by Date: Re: If folder does not exist ...
  • Next by Date: Re: applescript and graphics programs
  • Previous by thread: Re: If folder does not exist ...
  • Next by thread: Re: If folder does not exist ...
  • Index(es):
    • Date
    • Thread