Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pipe Delimited File
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00867217
Message ID:
00867234
Views:
22
Hi Neetu,

I'm assuming you wanted to add the pipe symbol to the end of each line, not replace the last data value with the pipe:

you could read cTempfile into a string with filetostr()
and then use strtran() to substitute the chr(13)+chr(10)
with '|'+chr(13)+chr(10)
and then write the result back to the file

cTempString=filetostr(cTempFile)
cTempString=strtran(cTempString,chr(13)+chr(10),'|'+chr(13)+chr(10))
strtofile(cTempString,cTempFile2)


>Hi -
>
>I am trying to create a pipe delimited file with the following command.
>
>Copy To (cTempFile) Deli With Character "|"
>
>I would like a end delimiter on every record to be a pipe instead of the value in the last field. Is there a way to do this? Please help.
>
>Thank you
>Neetu Kumar
Previous
Reply
Map
View

Click here to load this message in the networking platform