For loop in batch file error: Do was unexpected at this time -


i trying execute following command using batch file:

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

it works when being invoked on own in command prompt save within batch file fails message

do unexpected @ time

any ideas?

in batch use %%i, whereas in command line use %i


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -