delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/03/02/19:00:46

Message-ID: <38BEF6F5.2C79B4A2@teleline.es>
Date: Fri, 03 Mar 2000 00:19:17 +0100
From: Mariano Alvarez =?iso-8859-1?Q?Fern=E1ndez?= <malfer AT teleline DOT es>
X-Mailer: Mozilla 4.5 [es] (Win95; I)
X-Accept-Language: es
MIME-Version: 1.0
To: "djgpp-workers AT delorie DOT com" <djgpp-workers AT delorie DOT com>
Subject: [Fwd: Re: short file names when using LFN]
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii escribió:

> On Wed, 1 Mar 2000, Mariano Alvarez =?iso-8859-1?Q?Fern=E1ndez?= wrote:
>
> > >      putenv ("LFN=n");
> > >      _truename (long_name, short_name);
> > >      putenv ("LFN=y");
> >
> > No, sorry, this don't work to get the real sfn of a file.
>
> Please post the details.  The short test program attached below works
> for me.
>

I made two files, this is the dir output:
----
C:\PROGDJ>dir long*

 El volumen de la unidad C es DISCOC
 El número de serie del volumen es 3814-1F02
 Directorio de C:\PROGDJ

LONGFI~1 TXT             6  02/03/00  23:59 longfilename1.txt
LONGFI~2 TXT             6  03/03/00   0:00 longfilename2.txt
         2 archivo(s)                 12 bytes
         0 directorio(s)     706.097.152 bytes libres
----
This, your program output:
----
C:\PROGDJ>pr1 longfilename1.txt
`longfilename1.txt' -> `C:\PROGDJ\LONGFILE.TXT'

C:\PROGDJ>pr1 longfilename2.txt
`longfilename2.txt' -> `C:\PROGDJ\LONGFILE.TXT'

And this, the output of my routine:
----
C:\PROGDJ>lfngsfn longfilename1.txt
Long:  longfilename1.txt
Short: C:\PROGDJ\LONGFI~1.TXT

C:\PROGDJ>lfngsfn longfilename2.txt
Long:  longfilename2.txt
Short: C:\PROGDJ\LONGFI~2.TXT
----
Do you see the difference?

M.Alvarez

- Raw text -


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