• 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: making file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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?


References: 
 >making file (From: email@hidden)

  • Prev by Date: Re: HELP! PDF to EPS, how?
  • Next by Date: Re: HELP! PDF to EPS, how?
  • Previous by thread: making file
  • Next by thread: Re: making file
  • Index(es):
    • Date
    • Thread