Benches macOS

2

OS 9 <-> OS X filename tokenization

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

When older versions of Mac software (mainly OS 9 software) refer to files whose pathnames include files longer than 31 characters, something (Mac OS, the software?) tokenizes the file name. I would like to prepare OS X filenames for use in a piece of software that uses such tokenized file names.

I don't know if the tokenization is executed by OS X or the software in question (Tinderbox). I would be very grateful for pointers to utilities, primers, advice, etc. on how to tokenize OS X filenames for use by OS 9 programs (presuming this is my issue).

Below, I am including at the bottom of this post relevant material from a wiki entry
covering the same issue (Title is "Tokenized Pathnames in Tinderbox XML (2007-08-05)").

Thank you, in advance for any help anyone might offer.

Johnnie Wilcox

aka mistersquid

============

I'm trying to import EndNote XML files using a strategy similar to the one described in
ImportFromEndNote. In particular, I would like to have the links to PDF files preserved. EndNote exports (for one example) a file link as

/journals/Aethlon+%20The%20Journal%20of%20Sport%20Literature/018/1-2/Ahrenhoerster,%20Greg.%20%22 (Don't)%20Be%20the%20Ball++%20Or,%20What%20Michael%20Jordan-Wannabes%20Can%20Lea rn%20from%20Ralph%20Ellison.%22%20Aethlon++%20The%20Journal%20of%20Sport%20Literature%2018.1-2%20(2000)+%2021-27.pdf

while for the same file Tinderbox uses (note: tokenization marks, "^", depend on unwrapped line)

:journals:Aethlon++ The Journal of S#20BA:018:1-2:Ahrenhoerster, Greg. &quot;#20BF.pdf

^^^^^ ^^^^^

For clarity, the actual POSIX path is

/journals/Aethlon++ The Journal of Sport Literature/018/1-2/Ahrenhoerster, Greg. "(Don't) Be the Ball++ Or, What Michael Jordan-Wannabes Can Learn from Ralph Ellison." Aethlon++ _The Journal of Sport Literature_ 18.1-2 (2000)++ 21-27.pdf

Message was edited by: mistersquid

Message was edited by: mistersquid

2 replies

Sign in or join Beachball Help to reply.

  1. 0

    Camelot

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    IIRC, the truncation of long filenames is performed by the OS whenever the file is accessed via an app that isn't aware of how to handle long file names (typically older applications).

    The actual string used is somehow related to the file ID on disk, which helps ensure a unique name is generated.

    As a result there shouldn't be anything you need to do.

  2. 0

    mistersquid

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Camelot,

    Thank you for your reply.

    Do you (or anyone) know of a command-line utility, PERL program, or AppleScript program that will truncate/tokenize these long file names for programs that can't handle them?

    What I want to do is to build an XML file that points to the files with long names but which Tinderbox cannot understand. I would like to script or automate this process before Tinderbox receives the XML file. Otherwise, Tinderbox will simply ignore the XML attribute and I would have to manually browse for the file (of which there are many).

    Thanks, again, for your reply.

    Johnnie Wilcox

    aka mistersquid