Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append mult. text files
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00038247
Message ID:
00038278
Vues:
55
>I would like to know is there a way to append multiple text files that had delimiter by colons??
>My main problem is that the files name are dynamic (change everytime)
>any idea!!
>
>Thanx in advance

Sam:

You could place any text files in a subdirectory of their own. Then use ADIR() function to return an array of filenames found in that subdirectory.

lnCount = ADIR(laFiles, ".\TextDir\*.txt")

lnCount will be the number files found
laFiles is the array name
laFiles(1,1) will be the first file name
laFiles(2,1) will be the second file name, etc.

You could then set up a loop --

For i=1 to alen(laFiles,1)
lcTxtFile = laFiles(i,1)
append from (lcTxtFile) delimited with :
EndFor

HTH
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform