www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/14/00:15:03

Message-ID: <003a01be3f7b$89a0d9e0$0ca531ce@fresita-one>
From: "Jorge Ivan Meza Martinez" <jimeza AT usa DOT net>
To: <djgpp AT delorie DOT com>
Cc: <hoskinst AT cadvision DOT com>
Subject: RE: LFN in Win95? How do I do it?
Date: Thu, 14 Jan 1999 00:01:00 -0500
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

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 -


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