7

我正在尝试使用批处理文件执行以下命令:

for /f %i in (D:\random\servers.txt) DO (d:\utils\tail -60 \\%i\c$\Windows\windowsUpdate.log | d:\utils\grep "updates detected" & set tx1234=%i)

它在命令提示符下自行调用时有效,但是一旦我将其保存在批处理文件中,它就会失败并显示消息

做这个时候出乎意料

有任何想法吗?

4

1 回答 1

13

批量使用%%i,而命令行使用%i

于 2013-07-18T14:26:33.777 回答