how to read and write files in a folder and subfolders
<p>I am having a problem in reading and writing the files in folders and subfolders .</p>

<p>can anyonesay me how can i give multiple path to find files in the subfolders.</p>

<p>For Example:- test is the main folder </p>

<p>1) C:\test\</p>

<p>and i want to read and write the subfolder files</p>

<p>2)C:\test\12-05-2011\12-05-2011.txt</p>

<p>3)C:\test\13-05-2011\13-05-2011.txt</p>

<p>4)C:\test\14-05-2011\14-05-2011.txt</p>

<p>my code is working for only 1 folder not for subfolders.</p>

<p>my code is .</p>

<pre><code>   public void Timer1_Tick(System.Object sender, System.EventArgs e)
   { 

     string Path1 = "c:\\test" + "\\12-05-2011.txt");
     StreamReader reader1 = File.OpenText(Path1);
     string str = reader1.ReadToEnd();
     reader1.Close();
     reader1.Dispose();
     File.Delete(Path1);
     string[] Strarray = str.Split(new char[] {Strings.ChrW(10)});
     int abc = Strarray.Length - 2;
    }
</code></pre>

<p>can anyone say me what i need to change in this code.</p>

<p>Thanks In Advance</p>
