• 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: Creating a folder on the desktop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a folder on the desktop


  • Subject: Re: Creating a folder on the desktop
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 6 Sep 2005 10:15:57 -0700


On Sep 6, 2005, at 10:04 AM, Andrew Oliver wrote:

For various reasons, the Finder requires Mac-style paths, so a more
appropriate way to do this in the Finder is:

tell application "Finder"
    set myDesktop to folder "Desktop" of (path to home folder)
end tell

(note the use of 'path to home folder" to find the user's home directory
since you don't necessarily know their name)

If you want the user's home folder, simply "path to home folder" outside any tell statement will give it to you.


Although it's far, far easier to bypass the Finder altogether and just use:

set myDesktop to path to desktop folder

Although that works, "folder" is not needed; the following also works:

set myDesktop to path to desktop

--
I've noticed lately that the paranoid fear of computers becoming intelligent and taking over the world has almost entirely disappeared from the common culture. Near as I can tell, this coincides with the release of MS-DOS.
-- Larry DeLuca


_______________________________________________
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: 
 >Re: Creating a folder on the desktop (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Re: Creating a folder on the desktop
  • Next by Date: Quark to InDesign
  • Previous by thread: Re: Creating a folder on the desktop
  • Next by thread: Re: Creating a folder on the desktop
  • Index(es):
    • Date
    • Thread