COPY TO [LNF] SDF question

  • Follow


This question is about Klas Engwall's LFN library.

I need to save database as SDF (ASCII) file with a long file name.  Is
there a LF version of COPY_TO command or is doing a two-step procedure
(below) the only option?

   COPY TO temp.txt SDF
   LF_FRename("temp.txt", "langname.longextension")

TIA, Eugene


0
Reply E 10/15/2009 9:46:24 PM

Dear E. Fridman:

On Oct 15, 2:46=A0pm, "E. Fridman" <pm771...@gmail.com> wrote:
> This question is about Klas Engwall's LFN
> library.
>
> I need to save database as SDF (ASCII) file
> with a long file name. =A0Is there a LF
> version of COPY_TO command or is doing a
> two-step procedure (below) the only option?
>
> =A0 =A0COPY TO temp.txt SDF
> =A0 =A0LF_FRename("temp.txt", "langname.longextension")

He does not describe having done this, and if you object to having
these two lines in your root code, you could always wrap in in your
own LF_CopyTo()...

Or update to xHarbour...

David A. Smith
0
Reply dlzc 10/15/2009 10:49:00 PM


Eugene,

>This question is about Klas Engwall's LFN library.
>
>I need to save database as SDF (ASCII) file with a long file name.  Is
>there a LF version of COPY_TO command ...

The supply of functions is a reflection of the demand <g>

> ... or is doing a two-step procedure
>(below) the only option?
>
>   COPY TO temp.txt SDF
>   LF_FRename("temp.txt", "langname.longextension")

Yes, that's the way to do it. Just remember to delete
langname.longextension if it already exists or LF_Frename will fail.

Regards,
Klas

-------
klas dot engwall at engwall dot com

http://www.engwall.com/clipper/

The LFN Library for Clipper
The LanMan Library for Clipper
The NFPAT1A Timeslice release patch for the Nanforum Toolkit
0
Reply klas 10/16/2009 12:17:53 PM

Klas,

Thank you very much for your reply.

> Just remember to delete
> longname.longextension if it already exists or LF_Frename will fail

Missed that one. Will add.

Another question (since I have not tested myself yet).  Will files
like 'longfilename.extension1.extension2.extension3' be acceptable to
your LF_ functions?

TIA, Eugene

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
On Oct 16, 8:17=A0am, klas.engw...@nospam.please (Klas Engwall) wrote:
> Eugene,
>
> >This question is about Klas Engwall's LFN library.
>
> >I need to save database as SDF (ASCII) file with a long file name. =A0Is
> >there a LF version of COPY_TO command ...
>
> The supply of functions is a reflection of the demand <g>
>
> > ... or is doing a two-step procedure
> >(below) the only option?
>
> > =A0 COPY TO temp.txt SDF
> > =A0 LF_FRename("temp.txt", "longname.longextension")
>
> Yes, that's the way to do it. Just remember to delete
> langname.longextension if it already exists or LF_Frename will fail.
>
> Regards,
> Klas
>
> -------
> klas dot engwall at engwall dot com
>
> http://www.engwall.com/clipper/
>
> The LFN Library for Clipper
> The LanMan Library for Clipper
> The NFPAT1A Timeslice release patch for the Nanforum Toolkit

0
Reply E 10/16/2009 2:21:19 PM

Eugene,

>Another question (since I have not tested myself yet).  Will files
>like 'longfilename.extension1.extension2.extension3' be acceptable to
>your LF_ functions?

My LF_* functions do not care what characters you pass in file name
arguments, but the NTVDM may object to some. I have had reports about
the Euro sign not working, for example. But there is nothing special
with dots, they are just like any other character. The difference
between the part of the file name before a dot and the part after the
dot just lives in the mind of those of us who started working with
computers when the length of a file name was limited to 8 plus 3
characters.

Regards,
Klas

-------
klas dot engwall at engwall dot com

http://www.engwall.com/clipper/

The LFN Library for Clipper
The LanMan Library for Clipper
The NFPAT1A Timeslice release patch for the Nanforum Toolkit
0
Reply klas 10/17/2009 12:50:01 PM

Klas,

Thank you very much for the clarification. I got my process working.

Eugene
0
Reply E 10/18/2009 1:37:29 PM

Klas,

I have two more LF_ questions (if I may)

1. Will functions that allow wild-cards accept something like
"l*.txt.*"?

2. Does LF_FERASE accept wild-cards or do I have to use LF_DIRECTORY
and call LF_FERASE via AEVAL do delete the files individually?

TIA, Eugene

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
On Oct 17, 7:50=A0am, klas.engw...@nospam.please (Klas Engwall) wrote:
> Eugene,
>
> >Another question (since I have not tested myself yet). =A0Will files
> >like 'longfilename.extension1.extension2.extension3' be acceptable to
> >your LF_ functions?
>
> My LF_* functions do not care what characters you pass in file name
> arguments, but the NTVDM may object to some. I have had reports about
> the Euro sign not working, for example. But there is nothing special
> with dots, they are just like any other character. The difference
> between the part of the file name before a dot and the part after the
> dot just lives in the mind of those of us who started working with
> computers when the length of a file name was limited to 8 plus 3
> characters.
>
> Regards,
> Klas
>
> -------
> klas dot engwall at engwall dot com
>
> http://www.engwall.com/clipper/
>
> The LFN Library for Clipper
> The LanMan Library for Clipper
> The NFPAT1A Timeslice release patch for the Nanforum Toolkit

0
Reply E 11/12/2009 10:40:18 PM

Eugene,

>I have two more LF_ questions (if I may)
>
>1. Will functions that allow wild-cards accept something like
>"l*.txt.*"?

Did you try it? Please don't rely on me to provide all the answers. I
may not be around forever. :-)

>2. Does LF_FERASE accept wild-cards or do I have to use LF_DIRECTORY
>and call LF_FERASE via AEVAL do delete the files individually?

LF_Directory() is one way to do it. Another way is to run
LF_FindFirst() and LF_Ferase() in a loop until LF_FindFirst() returns
an empty string. Remembeer to kill the FindFirst handle before looping
back. Or use LF_FindFirst() and LF_FindNext(), but that requires
slightly more coding.

Regards,
Klas

-------
klas dot engwall at engwall dot com

http://www.engwall.com/clipper/

The LFN Library for Clipper
The LanMan Library for Clipper
The NFPAT1A Timeslice release patch for the Nanforum Toolkit
0
Reply klas 11/13/2009 7:46:57 PM

7 Replies
224 Views

(page loaded in 0.138 seconds)

Similiar Articles:













7/20/2012 4:13:17 PM


Reply: