delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/16/19:07:20

Message-Id: <4.3.2.7.0.20000916154435.00b39790@mail.subdimension.com>
X-Sender: matt DOT l AT mail DOT subdimension DOT com
X-Mailer: QUALCOMM Windows Eudora Version 4.3.2
Date: Sat, 16 Sep 2000 15:56:50 -0700
To: djgpp AT delorie DOT com, djgpp AT delorie DOT com
From: Matt Lewandowsky <matt DOT l AT techie DOT com>
Subject: Re: How do I get the msdos "long" (x~1.y) filename when I know
the real windows long filename
In-Reply-To: <qqQv5.9918$R_2.94366@afrodite.telenet-ops.be>
References: <M9lv5.421$Tn3 DOT 8133 AT news010 DOT worldonline DOT dk>
<lcisrs00nlas0p2b1hjbme4so0eok7v8pe AT 4ax DOT com>
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 12.18 09/13/2000, Tim 'Zastai' Van Holder wrote:
>"Damian Yerrick" <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> wrote in
>message news:lcisrs00nlas0p2b1hjbme4so0eok7v8pe AT 4ax DOT com...
> > On Tue, 12 Sep 2000 07:44:44 GMT, "Sven-Erik Bak"
> > <seb AT techno-matic DOT dk> wrote:
         <SNIPPED>
> > >"_lfn_gen_short_fname();"
> > >                THISISALONG.NAME    ->   THISISAL.NAM
> > > Dos interpretation
> > >                THISISALONG.NAME    ->   THISIS~1.NAM
         <SNIPPED>
>A poor man's alternative would be to generate candidate names yourself
>(ie collapsing spaces and dots, replacing illegal chars by underscores, and
>appending the numeric tail, ...) and then using stat until you find one with
><inodenum> = <inodenum in stat of long file name>. (of course, the
>appropriate flag must be set for this value to be computed; see 'info libc
>stat').
        <SNIPPED>
Hmm... Lessee...

C:\Long Directory Name> dir

  Volume in drive C has no label
  Volume Serial Number is DEAD-BEEF
  Directory of C:\Long Directory Name

THISIS~1 NAM   <DIR>        04-22-99 10:03a This Is A Long.Name
THISIS~2 NAM   <DIR>        04-04-00  6:37p This Is A Longer.Name
THISIS~3 NAM   <DIR>        04-22-99 12:24p This Is A Long.Name~
          0 file(s)              0 bytes
          3 dir(s)     254,705,664 bytes free

So... How do you restore the backup of THISIS~1.NAM? (For the sake of 
argument, it was created using Vim for Win32. ;) Can you differentiate 
between the three of these somehow? I'm not trying to be difficult. I'm 
just curious. I would love to find a way to do this from "real" DOS.

- --Matt

P.S. (as I'm about to queue the message...) Is there a way to format disks 
to have a specific serial number? And can it be compiled into a DJGPP 
program? (That oughta keep this in the scope of the group... ;)
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBOcP6seoMko8dOmunEQL2/wCfeTXELhaAOOB7gpB9O0AEdfUjcPsAoPeZ
/45bByJRFBSsUiMNC0wZdXqd
=Xicq
-----END PGP SIGNATURE-----

- Raw text -


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