Trying to burn HTML onto a CD and making a shortcut that links several dirs deep WITHOUT specifying a drive letter/name or running a Web server [MI]
February 9, 2005 1:56 PM   Subscribe

[CD FileSystemFilter] - Trying to burn HTML onto a CD and making a shortcut that links several dirs deep WITHOUT specifying a drive letter/name or running a Web server [MI]

So essentially we're burning a CD with a Web site on it. The problem is, in order for it to function properly, the index.html is about 4 dirs deep. So we want to create a shortcut at the CD's root (index.html), that when launched, will bring up the correct index.html several dirs deep.

We need this to work cross-browser and cross-platform (Mac, PC, Linux) and we don't want to specify a drive letter since people's CD-ROM drive letters are all different.

posted by bkdelong to Computers & Internet (17 answers total)
i guess this is so obvious it's wrong, but if you have a solution that involves a path (you mention a drive letter) why can't the path be relative?
apologies in advance...
posted by andrew cooke at 2:05 PM on February 9, 2005

Yeah, use a relative path.

Instead of using the link "D:/path/to/index/file"

use "path/to/index/file"

But still, not quite sure if that answers what you're asking.
posted by nitsuj at 2:08 PM on February 9, 2005

I think something like this should do it:

Index.html in the root should contain:

<script language="javascript">

<a href="/firstfolder/secondfolder/thirdfolder/fourthfolder.index.htm">Click here to launch web page.</a>
posted by SNACKeR at 2:14 PM on February 9, 2005

Use an HTML file with a meta refresh tag.
posted by cillit bang at 2:17 PM on February 9, 2005

<body onload="window.location.href='dir/dir/dir/file.html';">

posted by xmutex at 2:22 PM on February 9, 2005

relative path, yes, per nitsuj (Mac's dont have drive letters) - good suggestions SNACKeR and cillit bang.

I've done a number of audio + data enhanced CDs for bands I work with. My convention has been to put as few files at the top level as possible, with the "real" HTML in a subfolder called "site".

The index.html at the top level offers "live" internet links to the band site, label site, and then an "enter disc" link to access the enhanced content. Once you go into the disc, there are no external links, in case the user is on a dialup.
posted by omnidrew at 2:22 PM on February 9, 2005


<a href="directory1/directory2/directory3/file.html">Click here for music</a>

Am I missing something? This seems so easy.
posted by xmutex at 2:31 PM on February 9, 2005

Probably better (i.e. standard) to use the parent operator for relative path references:


Makes it easier to parse, that's for sure.
posted by AlexReynolds at 2:40 PM on February 9, 2005

I've been doing web development for six years now, in a lot of different places, and I've never seen the parent operator used in an anchor tag.

posted by xmutex at 2:59 PM on February 9, 2005

"Parent operator"? Wouldn't that be two dots? One dot is the current directory (which is what you want, but I think you got the wrong name).

xmutex, while you may not have seen them, they're perfectly legit.
posted by thebabelfish at 3:04 PM on February 9, 2005

Just as a sidenote, make sure the full path doesn't have any spaces in it or it won't work on Firefox/Win.
posted by jeb at 3:29 PM on February 9, 2005

Ah, sorry, you're right babelfish. Didn't read myself carefully enough. Not to be pedantic, xmutex, but it is POSIX convention. Not using it may be fine, but I find following standards makes something more "bulletproof" across a variety of (unknown) settings. YMMV.
posted by AlexReynolds at 3:34 PM on February 9, 2005

Expanding on Jeb's sidenote - be sure that none of the files on the disc have embedded spaces in the file names. This drove me crazy on a past project.

What's the max file name length? As I (dimly) remember OS9 cannot handle file names larger than 36 chars. The extension to Windows file systems that got that platform past 8.3 file names is called Joliet.
posted by omnidrew at 4:01 PM on February 9, 2005

Alex, HTML hrefs are URI references, and there's no mention in RFC2396 about requiring the ./ thing. POSIX isn't really relevant here.

Omnidrew: It's 31 characters.
posted by cillit bang at 4:25 PM on February 9, 2005

Related question: Does anyone have tips or links to how to make auto-run CDs that display the HTML files? I'd hope for a fairly easy solution that doesn't require compiling any EXE files and the like.
posted by odinsdream at 10:44 PM on February 9, 2005

in an autorun.ini file in the root directory of a cd:

open=start.exe index.html

That should launch index.html in the user's default web browser.
posted by zsazsa at 7:09 AM on February 10, 2005

You should be able to encode the space characters in a filename (it's %20, isn't it?).
posted by joeclark at 10:00 AM on February 10, 2005

« Older Why do I get sick so often and what can I do to...   |   kid/graffiti deterrant plants Newer »
This thread is closed to new comments.