Re: getting colon delimited path from POSIX path
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.