Mail Archives: djgpp/1999/01/14/00:15:03
Hello Tim,
use the _truename ( ... ) function to get LFN from a 8.3 name.
main()
{
if ( _dos_findfirst("*.*", _A_NORMAL, &ffblk) == 0 )
{
printf("%s\n", ffblk.name);
while ( _dos_findnext(&ffblk) == 0 )
{
printf("8.3 NAME = %s\n", ffblk.name);
printf ( "LFN NAME = %s\n", _truename(ffblk.name, NULL) );
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
}
}
you need windows9x to use this.
Jorge Ivan Meza Martinez
jimezam AT armenia DOT multi DOT net DOT co
jimeza AT usa DOT net
jimezam.home.ml.org
["O Lord, if there is a Lord, save my soul, if I have a soul--", Ernest
Renan]
-----Mensaje original-----
De: Tim Hoskins <hoskinst AT cadvision DOT com>
Grupos de noticias: comp.os.msdos.djgpp
Para: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Fecha: Miércoles, 13 de Enero de 1999 09:42 a.m.
Asunto: Re: LFN in Win95? How do I do it?
Sorry there, just noticed I posted some old bad code.
Here's the good code:
/* Simple DIR program */
#include <stdio.h>
#include <dos.h>
struct find_t ffblk;
main()
if ( _dos_findfirst("*.*", _A_NORMAL, &ffblk) == 0 )
printf("%s\n", ffblk.name);
while ( _dos_findnext(&ffblk) == 0 )
printf("%s\n", ffblk.name);
}
}
}
Please, any information on how to get this code to output long file
names when running off Win95 would be appreciated.
- Raw text -