Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending .txt files without spaces.
Message
De
08/05/2001 14:27:20
Jorge Villasenor
Luz y Fuerza Del Centro
Mexico City, Mexique
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00504731
Message ID:
00504919
Vues:
16
>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."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform