string path = ""; for (int i = 0; i < lstFilePaths.Items.Count; i++) { if (lstFilePaths.Items.Count > 0) { string fpath = Application.StartupPath + "\\UPLOAD"; if (Directory.Exists(fpath) != true) { Directory.CreateDirectory(fpath); } FileInfo fInfo = new FileInfo(fpath); string s = lstFilePaths.Text; string s1 = lstFilePaths.Items[i].ToString(); string[] ar = s1.Split('\\'); Int32 cnt = ar.Length; path1 = Application.StartupPath + "\\UPLOAD\\" + ar[cnt - 1].ToString(); if (File.Exists(path1)) { File.Delete(path1); } path += " ," + path1; File.Copy(s1, path1, true); // Here Error Occurred }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)