The Amazing Win2K/XP Command Shell For Loop

Compared to a Unix shell, Windows/DOS "for" loops are lame. But Microsoft has slowly hacked in all kinds of crazy and impossible to remember options which makes the "for" loops increasingly useful at the cost of some legibility.

Here is a very good and concise summary of the many strange and wonderful things one can do with the Win2K/XP Command Shell For Loops.

Here's another nice XP for loop page.