delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/25/14:14:33

From: "Campbell, Rolf [SKY:1U32:EXCH]" <moscoop AT americasm01 DOT nt DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Short file names
Date: Fri, 25 Feb 2000 11:56:11 -0500
Organization: Nortel Networks
Lines: 38
Message-ID: <38B6B42B.CE95C0A2@americasm01.nt.com>
References: <38B5AA55 DOT DF883608 AT teleline DOT es> <894trl$2o9$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
NNTP-Posting-Host: wmerh0tk.ca.nortel.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.72 [en] (X11; I; HP-UX B.10.20 9000/785)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id MAB08182
Reply-To: djgpp AT delorie DOT com

Hans-Bernhard Broeker wrote:

> Mariano Alvarez Fernández <malfer AT teleline DOT es> wrote:
> > Hello, do somebody know how to get/set the short file name in w9x when
> > you are using LFN's?
>
> In a nutshell: you *don't*. Short filenames are automatically
> generated by the system, and you're not given any influence over that
> process, except that you can disable *all* short file names gettting
> that pesky '~1' tail, even if they don't need them (see the
> 'NameNumericTails' trick). This is a rather severe design flaw in
> Windows' long filename implementation, IMHO. It causes all kinds of
> weird behaviour, inside Windows itself, too.

    The 'NameNumericTail' trick can cause some problems though.  Here's an
example of why I turned NNT back on:

Make 2 files, on named "a.cpp" and another named "a.cpp~" (I was using emacs
when I discovered this), the SFN's for these files will likely be "a.cpp" and
"a~1.cpp".  Now try copying both files to another directory.  There is a 50%
chance that one of the files will dissapear!
What happens is that if the "a.cpp~" file is copied first, it will have a
short-filename of "a.cpp", and then when the other file is copied, DOS decides
to overwrite "a.cpp~" with "a.cpp" because they have the same SFN.


--
(\/) Rolf Campbell (\/)



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019