I am trying to execute the following command using a batch file:
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)
It works when it is called on its own on the command line, but as soon as I save it in a batch file, it will fail with a message
It was unexpected at this time
Any ideas?
source share