True enough however the output is different so a little more work to handle
that - depends on how critical output format is.

e.g. 
CREATE CURSOR w_test (fld1 N(10,2), fld2 c(30), fld3 c(40), fld4 T, fld5 I,
fld6 L, fld7 d)

Delimited:
1.00,"1                             ","1
",16/08/2013 7:49:11 PM,35,.T.,17/08/2013

Textmerge
1.00, 1,1,16/08/2013 7:49:11 PM,35,T,17/08/2013

If file is small (less than the string limit) the easiest is possibly: (It
is also faster than textmerge by about 40%)

COPY TO c:\temp\myfile.tmp TYPE DELIMITED
STRTOFILE("First Line Text" + CHR(13) + FILETOSTR("c:\temp\myfile.tmp"),
"c:\temp\myfile.txt")
ERASE c:\temp\myfile.tmp


-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Alan
Bourke
Sent: Friday, 16 August 2013 6:20 PM
To: profoxt...@leafe.com
Subject: Re: Delimited TXT file

No need to complicate things with fopen() and low-level IO for most writing
strings to a file tasks.

set textmerge on noshow
set textmerge to myfile.txt
\ Here's my first line that the client wants.
select mytable
scan
 
\<<field1>>,<<field2>>,<<field3>>,<<field4>>,<<field5>>,<<field6>>,<<field7>
>
endscan
set textmerge off
set textmerge to 

[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/001301ce9a68$7a934070$6fb9c150$@ozemail.com.au
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to