title: To remove parent folder from url
body: <p>In the below code i am geting a url in a string in this format:Folder/File1 or Folder/SubFolder1/File.In this i want to remove the parent folder and get the file if it has subfolders it should create a subfolder in server in that name .Pls help me to do this.</p>
  
  <pre><code>public void FileUpload(string sBatchName, string url)
  {
       string dd=  url.TrimStart();
  
       string Uploadpath = ConfigurationManager.AppSettings["FilePath"];
       string ProjectName = drpBatchCreation.SelectedItem.Text;
       string strPhysicalApplicationPath = Uploadpath.TrimEnd("\\".ToCharArray()) + "\\"+ProjectName+"\\";
  
       strPhysicalApplicationPath = strPhysicalApplicationPath + "\\" + sBatchName + "\\Input\\" + dd;
  }
  </code></pre>