OSX: translate path with slashes to path with colons and volume name

Ask a Question related to Mac Applications & Software, Design and Development.

  1. #1

    Default OSX: translate path with slashes to path with colons and volume name

    Hi all,

    I need to convert a UNIX-path to a Mac OS X path.
    For example:
    /Applications/Chess.app
    matches
    Macintosh HD:Applications:Chess.app

    and, if i'd added a Volume called 'project' to the system:

    /Volumes/project/file.txt
    matches
    PROJECT:file.txt

    How can I translate a UNIX-path to a Mac OS 9 style path?
    This is possible using Applescript
    (see [url]http://macscripter.net/faq/general_osx.php[/url]), but I'd like
    to do it on the commandline, or in Java.

    I've searched google for about a day now, but it looks like
    I'm the first to ask this question...

    Thanks for your help,

    Arjan
    void Guest

  2. Similar Questions and Discussions

    1. clipping path shows ouside path in quark
      I'm making paths on silo'd objects on white backgrounds to place on colored backgrounds in quark 4. Operating pshop 6.01 in os 9.2. I put the path on...
    2. #25444 [Bgs->Opn]: php4isapi.dll path to win.ini doesn't load from current path.
      ID: 25444 User updated by: ict at primus dot ca Reported By: ict at primus dot ca -Status: Bogus +Status: ...
    3. #25444 [Opn->Bgs]: php4isapi.dll path to win.ini doesn't load from current path.
      ID: 25444 Updated by: sniper@php.net Reported By: ict at primus dot ca -Status: Open +Status: Bogus...
    4. #25444 [NEW]: php4isapi.dll path to win.ini doesn't load from current path.
      From: ict at primus dot ca Operating system: W2K PHP version: 4.3.3 PHP Bug Type: *Configuration Issues Bug description: ...
    5. load path as a selection button on the path palette
      What button is that and where is the path palette? I am using the pen tool.
  3. #2

    Default Re: OSX: translate path with slashes to path with colons and volume name

    Arjan Haverkamp <arjan@webpower.nl> wrote (Tue, 24 Jun 2003 15:12:54 +0200):
    > Well, that's not what I mean.
    > I have a Flash(SWF)-application that can only read files, when it is fed
    > with old, MAC OS9-style paths like "Macintosh HD:Applications:....".
    > Flash cannot read files on the Mac using the new Unix-style paths
    > (/Applications/...).
    > What I need is a way to translate the Unix-like paths to the old, OS9
    > style paths.
    > If Applescript can do it ([url]http://macscripter.net/faq/general_osx.php[/url]),
    > OSX should be able to do it on the commandline as well, right?
    > All I need is a way to convert a Unix-style path to its corresponding
    > OS9-style path (including the volume name!).
    Are you sure that that would work? I got the impression (based on
    "Mac OSX in a Nutshell") that old style colon paths work on only
    on HFS+ filesystems, while new style slash paths work on UFS
    filesystems, plus a few systems programs will accept slash paths
    even on HFS+ filesystems. So, if the underlying filesystem is a
    UFS volume, but the program rejects anything but HFS+ style paths,
    then you are in trouble.

    The "solution" may include involve the program and/or maintaining a
    HFS+ partition or drive on your computer.

    If there are only a few files involved, perhaps you could make a
    work directory with symbolic links to wherever the files you need
    are; then you would not need to specify the volume or directory in
    the path???

    Greg Shenaut
    gkshenaut@ucdavis.edu Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139