Via The Ultimate Insult.
Eric's Webspace has some fab tips on DOS and Windows script writing.
Combine with Unix utilities for Windows, and you can get a lot done.
Of course, you really ought to be using a real scripting language...
Java bits & bobs.
Update: