Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COPY TO (FileName) DELIMITED WITH BLANK
Message
 
 
To
13/07/2001 14:59:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00528283
Message ID:
00530453
Views:
25
You're not perfectionist, as me :) I can write and re-write my own code and form lots of times before I would be satisfied. Still the next round will come :)

>Whatever. When I get it to work, I sail off to the next problem..... ;-D
>
>>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
Reply
Map
View

Click here to load this message in the networking platform