• 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: Path to documents folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Path to documents folder


  • Subject: Re: Path to documents folder
  • From: Paul Berkowitz <email@hidden>
  • Date: Sat, 27 Jan 2001 20:25:44 -0800

On 1/27/01 7:02 PM, I wrote:

> On 1/27/01 6:46 PM, "Peter Gort" <email@hidden> wrote:
>
>> Hi People,
>>
>> There is a (path to preferences folder) that correctly returns the apth
>> to the preferences folder of whichever user is logged into the computer
>> (Multiple Users under Mac OS 9 and 9.1).
>>
>> However there does not appear to be a (path to documents folder). Does
>> anybody know of a way to get to the currently logged in User's Documents
>> folder?
>
> Hi, Peter
>
> (path to startup disk) as string & "Documents:"
>
> gives you the string version.
>
> alias ((path to startup disk) as string & "Documents:")
>
> gives you the actual folder (if it exists on the root hard disk, and
> hasn't been moved somewhere else).
>


Oops. I hadn't noticed the Multiple Users reference. This will do what you
want: it needs a separate action for when the user is the owner. It works in
OS 9.1: I'm not certain whether the 'path to current user folder' was
implemented in OS 9.0 or later.

------------------
try
set userFolder to path to current user folder
set docFolder to alias ((userFolder as string) & "Documents")
on error -- owner is current user, can't get path
set docFolder to alias (((path to startup disk) as string) &
"Documents")
end try
------------------------------------

OT: I've been spending the intervening time freezing and waiting to get into
a Test user to try this (and finally succeeded). Does anyone know why it
takes about 10 times as long for a user to get to its desktop on my G3/350
with 256MB RAM (and a lot more stuff) as it does on my 7200/120 with 92K
RAM?


--
Paul Berkowitz


  • Follow-Ups:
    • Re: Path to documents folder
      • From: Mr Tea <email@hidden>
References: 
 >Path to documents folder (From: Peter Gort <email@hidden>)

  • Prev by Date: ScriptMaster XT? v1.1
  • Next by Date: Re: Conflict with Smile's Scripting Additions.
  • Previous by thread: Re: Path to documents folder
  • Next by thread: Re: Path to documents folder
  • Index(es):
    • Date
    • Thread