Reputation: 1
When I run the command below on my Citrix server in a CMD window it works fine, but when I run it in a batch file I get "was unexpected at this time"
for /f "skip=1 tokens=2 delims=: " %f in ('nslookup www.domain.com ^| find /i "Address"') do ALTADDR /SET %f
How do I get this to work in a batch file?
Upvotes: 0
Views: 1721
Reputation: 56228
In a batch file you have to use %%f instead of %f:
for /f "skip=1 tokens=2 delims=: " %%f in ('nslookup www.domain.com ^| find /i "Address"') do ALTADDR /SET %%f
Upvotes: 4