Re: Referring to the local hard drive
Re: Referring to the local hard drive
- Subject: Re: Referring to the local hard drive
- From: JollyRoger <email@hidden>
- Date: Wed, 03 Jan 2001 23:25:50 -0600
on 1/3/2001 10:35 PM, Joseph Briggs at email@hidden wrote:
>
> set saveDelims to AppleScript's text item delimiters
>
> set AppleScript's text item delimiters to {":"}
>
> set diskName to text item 1 of (path to startup disk as text)
>
> set AppleScript's text item delimiters to saveDelims
>
> log diskName
>
>
I'm kinda new to this, so I can't be exactly sure if I'm right, but couldn't
>
you also use:
>
>
set yourVariable to characters 1 thru -2 of (path to startup disk as text)
>
as text
That works very well, and requires less time and steps. Good thinking! :)
>
This is also independent of the Finder (requires Standard Additions) and given
>
that the startup disk is every character except the colon of the startup disk
>
path, this should work. It seems to me, using the delimiters would be more apt
>
for extracting a second, third, etc., or last text item of a longer path.
Yes, your solution does seem to fit better to this particular task. Thanks
for contributing.
JR