• 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: Checking if a folder exists and dealing with it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking if a folder exists and dealing with it


  • Subject: Re: Checking if a folder exists and dealing with it
  • From: has <email@hidden>
  • Date: Thu, 5 Dec 2002 13:44:34 +0000

Thomas wrote:

Another solution without "try" block using the "exists" command

This is neater.


if (folder "Templates" of folder (aFolder as string) exists) is false then

This line can be simplified*:

if not (folder "Templates" of aFolder exists) then

has

* The extra 'folder' keyword and 'as string' coercion aren't necessary since aFolder is already a folder reference. 'As string' could also cause problems with foreign characters now the filesystem uses unicode.
--
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
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.
  • Prev by Date: Re: Run an AppleScript from within an AppleScript
  • Next by Date: Re: scriptable faxsoftware?
  • Previous by thread: Re: Checking if a folder exists and dealing with it
  • Next by thread: Re: Checking if a folder exists and dealing with it
  • Index(es):
    • Date
    • Thread