Why can't I move the selected file in the listbox?
string
selectedFile = Convert.ToString(listBox1.SelectedItem);
string path = @"G:\Template Markdown files" + selectedFile; (File location) string path2 = @"\\at2-r5db\e$\IMPEXP\IMPORT" + selectedFile; (File should be moved to here)
David Isaac19 reputationPosted Jun 21, 2007, 6:02 AM EDT
selectedFile =
"test.doc"; StringBuilder origPath = new StringBuilder(@"c:\Test\"); StringBuilder newPath = new StringBuilder(@"c:\Test\NewTest\");origPath.Append(selectedFile);
newPath.Append(selectedFile);
System.IO.
File.Move(origPath.ToString(), newPath.ToString());Drew Taylor66 reputationPosted Jun 21, 2007, 6:24 AM EDT
Thanks!