I am trying to execute following command using 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 being invoked on its own in command prompt but as soon as I would save it within batch file it fails with the message
Do was unexpected at this time
Any ideas?
in batch use %%i
, whereas in command line use %i
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With