0
Answer

error exceting DOS batch file in C#

princeanto

princeanto

19y
1.7k
1

Hi,

I am trying to execute a batch by passing two arguments, one of my argument have space in between. Because of that I am getting 'system coluld not file file' error. I would appreciate if anybody can help on this.

eg;

proc.StartInfo.Arguments  = @"D:\Temp\My Source D:\Test\Destination;
proc.StartInfo.FileName = @D:Temp\MyBat.bat;

here 'My Source' is a directory with space that make the error.

-prince