Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append mult. text files
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00038247
Message ID:
00038278
Views:
51
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform