• 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: check if a folder exists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: check if a folder exists


  • Subject: Re: check if a folder exists
  • From: Rob Jorgensen <email@hidden>
  • Date: Wed, 8 May 2002 14:03:17 -0400

On 5/8/02, Mark Oglesby commented:

Newbie alert!

Can anyone give me an example of an if -then -else
statement that would check to see if a folder exists in
the finder.

If a folder exists I want the finder to simply open it else I
want it to create it.

Tested with Mac OS 9.1/AppleScript 1.6:

set targetFolder to path to system folder

try
info for targetFolder -- uses Standard Additions instead of Finder
tell application "Finder" to open targetFolder
on error
-- make your new folder
end try

--
Best regards,

Rob Jorgensen
Ohio, USA
_______________________________________________
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: 
 >check if a folder exists (From: Mark Oglesby <email@hidden>)

  • Prev by Date: Re: Screensaver Problems
  • Next by Date: Re: Curious icons
  • Previous by thread: check if a folder exists
  • Next by thread: Re: check if a folder exists
  • Index(es):
    • Date
    • Thread