Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending .txt files without spaces.
Message
From
08/05/2001 14:27:20
Jorge Villasenor
Luz y Fuerza Del Centro
Mexico City, Mexico
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00504731
Message ID:
00504919
Views:
17
>You could add coma's and append DELIMITED WITH ,
myTextToString=FILETOSTR(MyFile.TXT)
do while OCCURS(" ",myTextToString) && " " while two blanks
myTextToString=strtran(myTextToString," "," ") && replace 2 blanks with on blank)
enddo
myTextToString=strtran(myTextToString," ",",") && replace 1 blank with coma
newText.txt=STRTOFILE(myTextToString)
then ..
APPEND FROM newText.txt DELIMITED WITH ,

>>>>>>* Or you could append the original file SDF
>>>>>>create cursor myCursor (Field1 C(28),Field2 C(27),Field3 C(26),Field4 C(14),Field5 C(5))
>>>>>>select myCursor
>>>>>>APPEND FROM MyFile.txt SDF

Lots of solutions!

I like the idea of not modifying the original info, I'll stick to your last solution.

Thank you Terry.


Imagination, Imagination, Imagination...
"Do what you love and love what you do."
Previous
Reply
Map
View

Click here to load this message in the networking platform