niko niko - 1 year ago 71
C Question

Opening a batch file (.bat) in a c program?

How do I start running a batch file (.bat) from my c program? I used

system("start /B omanam.bat");


but its not working.How can i make .bat to open through c ?

Answer Source

Drop the start. It's a cmd.exe thing. Just run system("omanam.bat");.