• 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: Use of 'path to ... folder creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of 'path to ... folder creation


  • Subject: Re: Use of 'path to ... folder creation
  • From: Alastair Rankine <email@hidden>
  • Date: Sat, 07 May 2005 07:38:02 +1000

Dennis Jones wrote:

Can someone give me an example of how to specify a folder to use and
create the folder if it does not exist.

My script uses ~/my-home/tmp to store a temporary file. I need the
script to create the tmp folder if it does not exist. From reading the
'path to' dictionary entry, it looks to me as if it could take care of
this for me.


Try this:

   set home to path to home folder -- or wherever
   tell application "Finder"
       make new folder at home with properties {name:"temp"}
   end tell

Also note there is a temp directory here, may be useful for storing temporary files:

   path to "temp" from user domain

Enjoy.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Use of 'path to ... folder creation (From: Dennis Jones <email@hidden>)

  • Prev by Date: Re: POSIX file wierdness
  • Next by Date: Re: move all files also with no extension via shell command
  • Previous by thread: Re: Use of 'path to ... folder creation
  • Next by thread: Re: Use of 'path to ... folder creation
  • Index(es):
    • Date
    • Thread