Re: making file
Re: making file
- Subject: Re: making file
- From: g3pb <email@hidden>
- Date: Thu, 23 Nov 2000 10:53:46 -0900
on SplitPath(filePath)
set filePath to filePath as string
set AppleScript's text item delimiters to ":"
tell filePath to if it ends with ":" then set filePath to text 1 thru -2
tell filePath to set {AppleScript's text item delimiters, ,
{folderPath, theName}} to {"", {(rest of text items 1 thru -2 of
(":" & it) & "") as string, last text item}}
{folderPath, theName}
end SplitPath
-- i got this from this list, not sure who's it is ...
-- hcir
mailto:email@hidden
>
i can't seem to figure this out:
>
i have a path to a non existing file, eg.
>
alias "Hard disk:documents:file 1"
>
how can i separate the name and the folder path so i can create the file if i
>
don't know the length of the name or path?