• 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: getting colon delimited path from POSIX path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting colon delimited path from POSIX path


  • Subject: Re: getting colon delimited path from POSIX path
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 31 Oct 2002 01:10:38 -0800

On 10/31/02 12:11 AM, I wrote:

> On 10/30/02 11:45 PM, "Donald Hall" <email@hidden> wrote:
>
>> How to I do this?
>>
>> I can go the other way, from colon delimited to POSIX path, but I want
>> to turn the path returned from a 'do shell script' command into a path
>> usable in AppleScript. It's not obvious from the Standard Additions
>> dictionary how to do this. It's easy to replace '/' with ':', but what
>> about the boot volume's name?
>>
>> I must not be looking in the right places. Thanks for any help,
>>
>
> POSIX file "/some/path"
>
> will give you an AppleScript file. In fact, if you use an actual hardcoded
> path, rather than a variable, it compiles with colons as you compile it.

But - if there are spaces in the path - you can't use 'quoted form' of the
POSIX path with single quotes, you need to \" escape-quote the path.




> Try:
>
> POSIX file "/Users/"
>
> If you want just the string path (with colons), try
>
> POSIX file "/Users/" as Unicode text
>
> to see.


--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: getting colon delimited path from POSIX path
      • From: John Delacour <email@hidden>
References: 
 >Re: getting colon delimited path from POSIX path (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: getting colon delimited path from POSIX path
  • Next by Date: Re: getting colon delimited path from POSIX path
  • Previous by thread: Re: getting colon delimited path from POSIX path
  • Next by thread: Re: getting colon delimited path from POSIX path
  • Index(es):
    • Date
    • Thread