Jan-Erik Posted December 30, 2003 Posted December 30, 2003 Hello, I have a small console application which browses through some folders under ONE spesific folder. This folder is coded in the application (as a variable). I would like to use some kind of file (ini?) to set the path of this folder, and the application will use the folder specified in the file. Anyone know how I'm able to do this? Quote
*Experts* mutant Posted December 30, 2003 *Experts* Posted December 30, 2003 If the only thing your file would contain is the folder path you can easily do it using IO.StreamReader class. If your file will contain more info then you will need to do some searching for the path. 'create a new stream reader so you can read the file Dim reader As New IO.StreamReader("path to the file") 'store path somewhere, this is assuming you have one thing in a file like I said before 'read it using the ReadLine method which will get the whole line for you dim folderpath as string = reader.ReadLine() reader.Close() :) Quote
Jan-Erik Posted January 2, 2004 Author Posted January 2, 2004 I made a class which returns the values of a file, and it works fine. But are there any other ways to make configuration files? Anyway, thanks for you help. The application works as it should now. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.