Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15516

Processing Files in a folder in sequence

$
0
0
I would really appreciate your help with the following interesting issue:
I am developing a Visual Basic program in MS Visual Studio version 16.3, as follows:

I have a list of several files in a folder on the computer. Each of the files in this folder contains customer information. Each file, referring to a separate customer, has exactly the same layout and contains the same information (e.g. Customer first name, Customer surname, Company name, Email, etc.).

I have extracted this customers files via a separate tool and placed them in the folder.

To process the customers information in my own Visual Basic program, ideally, I would like to have all my customers information in one ‘consolidated’ file instead of having each customer in a separate file. However, for reasons beyond the scope of the current discussion, this is not possible!

I have to deal with the situation as it is. Therefore, I need my own Visual Basic to perform the following steps:

1 – Access the folder where the customers files are stored (this is always the same path. If need be I can hard-code the path in the program)

2 – Access each file in the folder in turn. Open, read and process the customer information in the file. Once done, close the file and proceed to the next file containing the information for the next customer.

3 – Exit when the last file in the folder is processed.

I would really appreciate your help/advise with this rather intriguing problem! The prime question is how I can separate each file separately...

Viewing all articles
Browse latest Browse all 15516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>