Horje
get folders in directory c# Code Example
read folder c#
string mydocpath=Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);     
      StringBuilder sb = new StringBuilder();
      foreach (string txtName in Directory.GetFiles(@"D:\Links","*.txt"))
      {
        using (StreamReader sr = new StreamReader(txtName))
        {
          sb.AppendLine(txtName.ToString());
          sb.AppendLine("= = = = = =");
          sb.Append(sr.ReadToEnd());
          sb.AppendLine();
          sb.AppendLine();   
        }
      }
      using (StreamWriter outfile=new StreamWriter(mydocpath + @"\AllTxtFiles.txt"))
      {    
        outfile.Write(sb.ToString());
      }   
get directory of file c#
using System.IO;

string file = "C:\Documents\file.txt";
Path.GetDirectoryName(file);
get folders in directory c#
string[] folders = System.IO.Directory.GetDirectories(@"C:\My Sample Path\","*", System.IO.SearchOption.AllDirectories);




Csharp

Related
c# datagridview hide row selector Code Example c# datagridview hide row selector Code Example
how to not overwrite a text file in c# Code Example how to not overwrite a text file in c# Code Example
c# get all bytes of a file Code Example c# get all bytes of a file Code Example
c# find longest string in a list Code Example c# find longest string in a list Code Example
decalre an int list mvc Code Example decalre an int list mvc Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8