• 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: How to determine if a folder exists on a system?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to determine if a folder exists on a system?


  • Subject: Re: How to determine if a folder exists on a system?
  • From: Steve Thompson <email@hidden>
  • Date: Wed, 08 Jul 2009 18:00:17 +0100


On 8 Jul 2009, at 17:38, OSullivan, Steven wrote:

if folder "/usr/local/bin" does not exist then
    create it
else
    exit block
end if

Try this:

tell application "Finder"
if not (exists folder (POSIX file "/usr/local/bin")) then


do shell script "mkdir /usr/local/bin"
end if
end tell





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to determine if a folder exists on a system?
      • From: Yvan KOENIG <email@hidden>
References: 
 >How to determine if a folder exists on a system? (From: "OSullivan, Steven" <email@hidden>)

  • Prev by Date: Re: How to determine if a folder exists on a system?
  • Next by Date: Re: How to determine if a folder exists on a system?
  • Previous by thread: Re: How to determine if a folder exists on a system?
  • Next by thread: Re: How to determine if a folder exists on a system?
  • Index(es):
    • Date
    • Thread