• 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: Searching for a folder in Applescript.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Searching for a folder in Applescript.


  • Subject: Re: Searching for a folder in Applescript.
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 4 Sep 2003 10:05:29 -0700

On Thursday, September 4, 2003, at 09:33 AM, Vic Piercy wrote:

In a nutshell, I need it to check for the folder first if it is there then
the script will end. If it is not there then it will create a new folder
with the current date.

The easiest way is to put it inside a try wrapper

try
tell application "finder"
make new folder at desktop with properties {name: today}
end tell
end try

If there is no folder with that name, it will create one. If there is a folder with that name, it will create an error, but the try structure will bypass the error.

--Michelle

--
"Beware the march of ideas."
_______________________________________________
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: 
 >Searching for a folder in Applescript. (From: Vic Piercy <email@hidden>)

  • Prev by Date: Re: Displaying a lists items as items
  • Next by Date: Re: Renaming files in Finder: why so slow?
  • Previous by thread: Searching for a folder in Applescript.
  • Next by thread: Re: Searching for a folder in Applescript.
  • Index(es):
    • Date
    • Thread