• 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: Christopher Nebel <email@hidden>
  • Date: Tue, 11 Jun 2002 15:03:25 -0700

Alternatively,

if not exists folder "MyFiles" of the startup disk then ...
if not (folder "MyFiles" of the startup disk exists) then ...

The second one works because "exists" has a special case in the parser that lets it show up *after* the object as well as before.


--Chris Nebel
AppleScript Engineering

On Tuesday, June 11, 2002, at 02:08 PM, David Nelson wrote:

Yep. The syntax is not super intuitive but it's doable:

tell application "Finder"
if (exists of folder "MyFiles" of startup disk) is false then
-- Create the folder.
end if
-- continue with my script
end tell

On Tuesday, June 11, 2002, at 03:36 PM, Charles Heizer 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
_______________________________________________
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.

References: 
 >Re: If folder does not exist ... (From: David Nelson <email@hidden>)

  • Prev by Date: Re: script, do script
  • 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