I can't say how any people asked me the same question at the end of threads similar to this one! And the replay is always the same... I can't suggest neither a book nor a satisfactory web site to learn about scripting.
There are obviously a lot of web sites about batch scripting, but, in my opinion, they all are not good in some way. Try to search by google setting "NT batch scripts" or "files", then help yourself to go on into the jungle.
The reason to set "NT" is due to the hidden (to the most people) difference between the command line in DOS-based systems (Windows 9X/ME) and NT-kernel environments (Windows NT/2K/XP). Despite their commercial logo (Windows) DOS and NT systems belong to absolutely different families; the prompt however is confusing as the NT-system console (the prompt you see in Win 2K/XP/NT) looks like the old command.com DOS prompt.
So you need to learn the basic DOS scripting and then go further into NT scripting that is far more powerfull (e.g. Set /P works under NT-kernel only).
A way to learn about commands is to type the /? switch after their op-code to get the on-line help (e.g. Set /?). That is not a friendly way, but it works if you are a serious student. To follow that way you have however to know the command op-codes and have a basic exposure to scripting structures (If, GoTo, Call and so on).
How did I learn the black magic? Twenty years ago reading the DOS handbook packaged with my first personal computer and then walking through the /? switch while DOS became Windows 9X, NT....XP.
Tomorrow never ends...