Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting colon delimited path from POSIX path



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.

References: 
 >Re: getting colon delimited path from POSIX path (From: Paul Berkowitz <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.