Hi all,
I'm chasing some help with opening files in my program. To open a data file I would normally use OpenFileDialog() and FileStream() which works great but...
I am trying to load some metastock data files but they are indexed by a file called master.dat. Master.dat is in an old format which I have parsed out and it gives an index of what the other files (F*.dat) represent in the directory. I can then go and open the correct F*.dat and retrieve the O,H,L,C data. But this is a two step process to get to where I want.
Example... open the directory the first time->
F1.dat
F2.dat
.
.
F50.dat
Master.dat
- I have to open Master.dat first to find out which F*.dat I'm looking for. The way I parsed out Master.dat looks something like this (not necessarily in alphabetical order.
Filename, Ticker, Long Name, First Data, Last Data
F1.dat, MSFT, Microsoft, 24/9/1999, 27/9/2010
F2.dat, CAM, Cameron Ent, 1/1/2005, 27/9/2010
.
.
F50.dat, APPL, Apple Comp, 24/9/1999, 27/9/2010
I then go and open the corresponding F*.dat file to get the data I want.
What I'd like to do is have the OpenFileDialog automatically open the Master.dat file and then list the contents shown above where I'd normally see the files, I can then directly open the stock file I want. I've sorted out the indexing code I just need someway of opening a directory and the master.dat loading automatically to show the index, not the actual file names.
Thanks in advance
Flatstrap