how to read dat files in sub folders
<p>I have this code that reads the data from a folder.I want to read data from the sub folders too, it is too cumbersome to process the folders one by one. Can you help me with that?</p>

<p>Here is my code:</p>

<pre><code>private void btnSource_Click(object sender, EventArgs e)
{
    fbdSourceMDATA.Description = "Please select MDATA source folder";
    fbdSourceMDATA.RootFolder = Environment.SpecialFolder.Desktop;
    if ((fbdSourceMDATA.ShowDialog() != DialogResult.Cancel) |(fbdSourceMDATA.SelectedPath != ""))
    {
        sourceMDATA = fbdSourceMDATA.SelectedPath;
        if (File.Exists(sourceMDATA + "\\Master"))
        {
            txtSourceMDATA.Text = fbdSourceMDATA.SelectedPath;
            Interaction.SaveSetting ((new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.Title , 
                                     "RealTime Converter", "sourceMDATA", fbdSourceMDATA.SelectedPath); 
        }
        else
        {

        }

        FETALIBLib.FLReader Reader = new MFTALIBLib.FLReader();
        Reader.OpenDirectory(txtSourceMDATA.Text);
        Reader.ReadMaster();
        lbmainMDATA.Items.Clear();
    }
}
</code></pre>
