One way to handle this problem is to do what Windows 95 did - use the
comment field of filename to store the extended filename. In early versions
of CP/M (and MS-DOS), doing a DIR command or (PIP>DIR on CP/M) would display
the filename, as well as a comment the user might have supplied with the
filename. Creating 8.3 MS-DOS style file names is not really difficult from
long file names - chop off everything but the first six characters of the
filename (except if spaces, in which case read the next character). Append
~1 to the name and append the first three characters of the extension. If
this filename already exists, change the ~1 to ~2 (or ~3, ~4, etcetera)
until you have a filename which doesn't exist. This involves going a little
bit beyond normal C calls like fopen - you have to use low level I/O calls
to access the comment field. I don't think you have to go as low as sector
reads of the file allocation table, but I may be mistaken - it has been a
long time since I worked with real mode MS-DOS int 0x21 calls.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 15, 2000 4:30 AM
To: [EMAIL PROTECTED]
Subject: Re: Long filenames howto ?
Hi Sergei,
> Petri wrote:
>
> > Anyway, what did Sergei (I *think* it was him) need LFNs for? It's much
> > easier for me to explain something when I can give an example...
>
> I needed them when running under Windows, and can't have
> access to some files with very long filenames (more than
> 64, 15-16 symbols from beginning same).
>
> I think that exist some way to force Arachne, launched under
> windows, understand windows's names.
> Now i can see than i'm only one here who need it.
No, you are not the only one who would find this useful. I can give
another example.
I am a consulting industrial chemist, specialising in chemical safety
and
regulation compliance. As part of my work, I am compiling a data base
(=collection) of HTML files of chemical data, downloaded from the web sites
of
a large number of chemical suppliers. On these sites, the HTML files are
stored with long file names. Unfortunately my system (DOS 6.2 & Win 3.1)
cannot handle long file names, and I find the downloads of consecutive file
names end up with only the last one, because each one has over-written the
previous one if the first six characters are the same. i.e. nnnnnn~1.htm.
THIS CAN BE IRRITATING !!!!!!
It would be nice to use a browser that could keep these consecutive file
names separate.
Regards,
Ron
Ron Clarke http://homepages.valylink.net.au/~ausreg/music.html
-- This mail was written by user of Arachne, the Ultimate Internet Client.