Re: Path to a file
Re: Path to a file
- Subject: Re: Path to a file
- From: "Arthur J Knapp" <email@hidden>
- Date: Sat, 07 Apr 2001 15:19:46 -0400
>
Date: Sat, 07 Apr 2001 11:43:49 -0400
>
Subject: Path to a file
>
From: giZm0 <email@hidden>
>
Hi, I am trying to get a path to a file as string.
>
Tell app 3Finder2
>
set lalocation to (path to (file "mp3list.txt" of system folder)) as string
>
End tell
>
But I just keep getting error messages
>
Ps: I cant just specify 3Macintosh HD:System Folder: mp3list.txt2... Since
>
my script will be used on several macs.
-- Note: You don't need to be inside a Finder tell statement
-- for these. "path to" is a scripting addition command.
-- It only works with "special", pre-defined folders
-- of the Macintosh.
set system_folder_asAlias to path to system folder -- Standard Additions
--
-- alias "MacHD:System Folder:"
set system_folder_asString to "" & system_folder_asAlias
--
-- "MacHD:System Folder:"
set file_asString to system_folder_asString & "mp3list.txt"
--
-- "MacHD:System Folder:mp3list.txt"
set file_asAlias to alias file_asString
--
-- alias "MacHD:System Folder:mp3list.txt"
-- Which leads us to a more useful single-line snippit:
set aFile to alias (("" & (path to system folder)) & "mp3list.txt")
--
-- alias "MacHD:System Folder:mp3list.txt"
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://www.LateNightSW.com