Suggestions - perhaps you could script with another language rather than using a .bat? For example you could use Python to create the commands. With that you might also be able some simple looping instead of successive commands, which would make future changes easier (not that you can't do this with a batch file also, but personally every time I've tried to do anything similar with batch files I've ended up losing the will to live..).