23Oct/090
For loops in dos batch files.
I was trying to shut down a bunch of servers today, and thought I'd do it with a batch file. It (rather embarrassingly) took me a while to remember how to do this, it's been shuch a long time:
@echo off for %i in (01,02,03,04,05,06,07,08,09,10,11,12,13,14) do shutdown -s -t 00 -m \\BL%i
I would have used for /L %i in (1,1,14) do ... but there is no way to tell the loop to make 01, 02, 03 instead of 1,2,3













