I would like to copy my files from source folder to my dest. folder
The location / URL(Name of the column in the table) I got it from here GetDataByGeneralRoot();
Now I would like to copy those file from that URL to a new directory.
What I have done is:
DataSet1.T_DocumentsDataTable docTab = doc.GetDataByGeneralRoot(); string gerneralRootPath = docTab.Rows[0]["URL"].ToString(); gerneralRootPath = gerneralRootPath.Remove(gerneralRootPath.IndexOf("PDF") + 4); string datadirectory = "//ch-s-0001535/G/inetpub/DocAddWeb/DataSource/"; string final = datadirectory + gerneralRootPath; foreach (string path in Directory.GetFiles(final, "*.*", SearchOption.AllDirectories)) { string t = path.Substring(path.IndexOf("\\") + 1); File.Copy(t, t.Replace(final + t, rootFolderAbsolutePath)); } My issue / problem is how can I say that I want to get only the files from URL that I got from my method GetDataByGeneralRoot and not all the files what is now happening.
