windows批处理脚本bat命令解析【10】如何运行cmd命令

说来惭愧,感觉这个本来就不是问题。

先公布答案:

你在cmd黑窗口下输入什么,就把这行命令写入到bat脚本中,九江。

前面和后面什么也不用加。

比如,要在cmd下通过node运行某个hello.js文件,命令为

node hello.js

那么在bat脚本中,只需要作如下处理:

@echo off
node hello.js

即可。

猜你喜欢

转载自blog.csdn.net/jigetage/article/details/81128888