Running batch file with arguments from C#
I have a batch file like this @echo off xcopy /e %1 %2 I have my C# code as follows: string MyBatchFile = @"C:\Program Files (x86)\MybatchFile.bat"; string _sourcePath = @"C:\FolderToCopy"; string _tempTargetPath = @"C:\TargetFolder\"; var process = new Process { StartInfo = { Arguments = string.Format("{0} {1}", _sourcePath, _tempTargetPath) } }; process.StartInfo.FileName = MyBatchFile; bool b = process.Start(); I expect this to copy the source files to target location. But nothing happens. My console window also does not stay for enough time so that I can see the error. Can anyone guide to