• 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: Jean-Baptiste Le Stang <email@hidden>
  • Date: Wed, 08 May 2002 22:10:54 +0200

You can try ChackPath 1.0 by Serge Belleudy-d'Espinose
(www.macscripter.net, applemods section)
You will find a mod to check wether or not a path is real.
Jean-baptiste

> 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.
>
> this is the script I have so far:
>
> --set inital variables
> set people to {}
> set currentDate to current date
> set currentMonth to month of currentDate
> set currentDay to day of currentDate
> set dateFolder to currentDay & "_" & currentDay as
> string
>
> tell application "Finder"
> --get list of people getting email
> list folder (alias "DEC6:Master_Email_%0:")
> set people to people & result
> set mailOwner to choose from list people with prompt
> "This mail belongs to:"
> try
> set folderAddress to ("DEC6:Master_Email_%0:" &
> mailOwner & ":")
> make new folder at alias folderAddress with
> properties {name:dateFolder}
> set finalFolder to folderAddress & dateFolder
> open folder finalFolder
> on error errmsg number errNum
> display dialog "This days folder is already there"
> set alreadyThere to result of button
> end try
>
> end tell
>
> Thanks for the help. This list has been a great source
> of info.
>
> Mark Oglesby
> email@hidden
> _______________________________________________
> 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.
_______________________________________________
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: check if a folder exists
      • From: Richard Baskett <email@hidden>
References: 
 >check if a folder exists (From: Mark Oglesby <email@hidden>)

  • Prev by Date: Re: AsciiNumber & AsciiCharacter Handlers
  • Next by Date: Re: Extra Drives
  • Previous by thread: Re: check if a folder exists
  • Next by thread: Re: check if a folder exists
  • Index(es):
    • Date
    • Thread