Board index » delphi » HELP !!!! long file name support 2nd time

HELP !!!! long file name support 2nd time

Looking for long file name support under TP 7.0 !!!!!!!
      Can anybody help me, please ?????

        Thanks, Robert

 

Re:HELP !!!! long file name support 2nd time


Robert Almasi schrieb:

Quote

> Looking for long file name support under TP 7.0 !!!!!!!
>       Can anybody help me, please ?????

>         Thanks, Robert

On the TP-links page, chapter "source" is natlfn.zip.
It contains the unit NatLFN as source code.

Re:HELP !!!! long file name support 2nd time


Quote
Robert Almasi wrote:
> Looking for long file name support under TP 7.0 !!!!!!!
>       Can anybody help me, please ?????

>         Thanks, Robert

     A method that worked for me (using a DOS-based Standard Pascal
compiler that,
like Turbo, only used 8.3 format file names) was to spawn a DOS command
(I believe
this is called Exec in Turbo) that did a DIR filename > dirfile, i.e.
that used DOS to get
a directory, piping the output to a file, and using the chosen file name
(which could have
wild cards, and could also include the /s switch to make it descend
recursively).  I then
read in (using normal Pascal i/o) the newly-created output file
"dirfile" and parsed it.
DOS 7 (under Win95) writes the 8.3 form of the DOS name on the left,
various file
information (like size and date) in the middle, and the LFN name on the
right.  Now all
I had to do is look for the LFN I wanted, read off the 8.3 name, and use
that to open
the file.

     Of course, this is a bit of a pain.  Fortunately for my sanity,
there are Win95-compatible compilers that can directly handle LFNs.
Makes life much simpler.

Bob Schor
Pascal Enthusiast

Other Threads