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 Subject: Re: How do I get the msdos "long" (x~1.y) filename when I know the real windows long filename In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain 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 Precedence: bulk -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At 12.18 09/13/2000, Tim 'Zastai' Van Holder wrote: >"Damian Yerrick" wrote in >message news:lcisrs00nlas0p2b1hjbme4so0eok7v8pe AT 4ax DOT com... > > On Tue, 12 Sep 2000 07:44:44 GMT, "Sven-Erik Bak" > > wrote: > > >"_lfn_gen_short_fname();" > > > THISISALONG.NAME -> THISISAL.NAM > > > Dos interpretation > > > THISISALONG.NAME -> THISIS~1.NAM >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 > = . (of course, the >appropriate flag must be set for this value to be computed; see 'info libc >stat'). 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 04-22-99 10:03a This Is A Long.Name THISIS~2 NAM 04-04-00 6:37p This Is A Longer.Name THISIS~3 NAM 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 iQA/AwUBOcP6seoMko8dOmunEQL2/wCfeTXELhaAOOB7gpB9O0AEdfUjcPsAoPeZ /45bByJRFBSsUiMNC0wZdXqd =Xicq -----END PGP SIGNATURE-----