I've been writing Windows batch files for a long time — since back when they were DOS batch files. I remember back in my time at IMC when a guy showed me his contrived DOS subroutines. This was prior to the internet age so he either developed the idea on his own or found it in a book. Kludgey, but it worked.
Over the years the abilities of the Windows batch language has grown, but few know how to make use of all of it. I've had to use many of these features over the years and figured it is time to drop this onto the internet for others to make use of.
The Windows batch language is much maligned and a long time ago it may have been deserved. And while it may not be up to bash standards of UNIX/LINUX, it can certainly do most of what we need it to do.
I doubt I'll be able to cover everything. Start with a simple command /? at a command prompt to read what MS has said. If that still doesn't cover it all, ask the internet. Someone has addressed it! Feel free to post questions and comments and We'll try to answer them.
Grab a good beer and read through. Hopefully there is something here for you.