|
-
Jun 16th, 2015, 10:03 PM
#1
Thread Starter
Junior Member
[RESOLVED] Read contents of text files in a director into an array
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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|