Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COPY TO (FileName) DELIMITED WITH BLANK
Message
 
 
To
09/07/2001 15:34:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00528283
Message ID:
00528442
Views:
18
Hi John,

Tom is right, you can do it by a single command
COPY TO (m.lcFileName) DELIMITED WITH " " WITH CHARACTER " "
However, when you need to use TAB as a delimiter, there is no single VFP command and you have to work around this problem. For huge files filetostr approach would not work, that's why I have a FAQ #8016 here.

>Or automate with .....
>
>COPY TO myfile.txt DELIMITED WITH BLANK
>cFile=FILETOSTR("myfile.txt")
>cFile=STRTRAN(cFile,'" ') && replace quote and space after with space
>cFile=STRTRAN(cFile,' "') && replace quote and space before with space
>=STRTOFILE(cFile,"myfile.txt",.F.)
>
>
>>>The FP DOS COPY TO (FileName) DELIMITED WITH BLANK command does not put double quotes around character fields as advertised in the help file. That problem has been fixed in VFP. I am converting a program from DOS to VFP that uses the broken COPY TO command. Does anyone know how to create a COPY TO command in VFP that emulates the old DOS commnad?
>>>
>>>Thank you.
>>
>>You can create the text file in VFP with COPY TO (FileName) DELIMITED WITH BLANK, then edit the text file and remove double quotes by doing the global replace.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform