用C语言调用.bat批处理命令

本文主要总结用C语言调用.bat批处理命令,具体的语句如下:

system("cmd.exe /c \"D:\\userdataImage\\test.bat\"");

其中,需要包含stdlib.h库,使用system()时,格式为:system(”命令行”);

比如:

system(“pause”);


参考内容:

https://blog.csdn.net/sanqima/article/details/37764049(重点参考)

https://bbs.csdn.net/topics/391044514

猜你喜欢

转载自blog.csdn.net/naibozhuan3744/article/details/80563083