nodejs执行cmdshell命令

Posted 大茅坑的小石头

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nodejs执行cmdshell命令相关的知识,希望对你有一定的参考价值。

var exec = require(child_process).exec;
function execute(cmd)

exec(cmd, function(error, stdout, stderr)
if(error)
console.error(error);

else
console.log("success");

);


execute(del .\\\\aaa\\\\aaa.txt);
execute(copy .\\\\aaaa\\\\aaa.txt .\\\\aaa);

 


以上是关于nodejs执行cmdshell命令的主要内容,如果未能解决你的问题,请参考以下文章