What is the best place to go to find how to effectively understand how to use variables in DOS batch files? Other than the basic %1, %2, etc. examples, it's difficult to find much good information.
Specifically, I'm a bit confused on the multiple % signs used with variables. Sometimes you just see one, and other times you'll see %%<variable> or %<variable>%. I get the system variable thing, but it's still confusing with all of the variations and specifics for those variations. It would be nice to learn about the more complicated aspects, such as when to use what variables with which special coding needed for each and where to use them.
If possible, I prefer getting the information on where to find the answer, rather than just be given the answer...I find I remember things much easier if I have to do a little research myself. It also helps in becoming a resource for others...if I truly understand the answer, rather than just repeat what I've been told, I can help others much better than I could if I were just tossed a quick bit of code. Does anyone have a reference that might be a good starting point to learning these intricacies (online is much better than book learning, as cost is an issue)?