Hi
I'm making a program in Visual Basic, and i'm trying to find out how to read the contents of a directory into an array. In a loaction, for example, "C:\samplefolder", there are an unspecified number of text files, and the contents of these files need to be read into an array. I had an idea where an the program goes through the directory and enters the file name of each text file into an array called "filename()", then using the information stored in the "filename()" array, basic text file processing could be used to extract the contents of the array i.e. FileOpen(Filenum, filename(x), OpenMode.Input). The only problem is
a) I don't know how to get the program to go thorugh the directory and get the file names
b) I don't know how to write the contents of the text files into an array, although i do no how to insert it into a text box

It would be greatly appreciated if you could help me

thanks