Can someone please help me out with the syntax here
string sourcePath = @textBox2.Text.ToString();
string targetPath = @textBox1.Text.ToString();
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(@"XCOPY C:\folder D:\Backup\folder /i");
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
psi.UseShellExecute = false;
System.Diagnostics.Process copyFolders = System.Diagnostics.Process.Start(psi);
copyFolders.WaitForExit();
I am trying to change this line below to replace c:\folder with (sourcePath) and D:\Backup\folder
with targetPath
(@"XCOPY C:\folder D:\Backup\folder /i");
I keep getting source not found when I messagebox like this it looks ok
MessageBox.Show(@"XCOPY " + (sourcePath) + (targetPath) + " /i");