Oh one last thing, some tips!
The most concise reference you're going to find on the command line is probably Microsoft's own help file: enter this at run:
hh ntcmds.chm
And one of the most useful bits of information when you're starting out with batchfiles is knowing how to view the errorlevel returned by a command, at the prompt type:
echo %errorlevel%
to view the errorlevel of the last run command.
Feel free to ask any batch file specific questions if you get stuck.