F1 help on windows is surprisingly useful when writing DOS style batch files. From the windows desktop, hit F1 and search for batch. The link for Using Batch Parameters is pretty helpful for doing odd tricks with DOS. The 'Using Batch Files' page is also quite good. As other posters mention, you're better off avoiding batch as your implementation language, but if you must, you must.