2
我试图删除y:
驱动器,该驱动器使用这一批处理脚本映射到网络目录。如何在批处理脚本中隐藏'net use'命令错误消息
net use y: /d /y>nul
但在y:
不存在的情况下已经删除。它给了我这个错误信息。
The network connection could not be found.
More help is available by typing NET HELPMSG 2250.
有没有办法避免打印这个错误?我曾尝试net use y: /d /y>nul>nul
,但没有运气
DelboyJay回答这里:[重定向标准输出和stderr到单个文件](http://stackoverflow.com/questions/1420965/redirect-stdout-and-stderr-to-a-single-file) –