I don't suppose you are familiar with the old Quick-Basic? are you? (and if you happen to be able to make/compile an executable dos program to call from a batch file?) you can read/change the string THAT way.
If you want to stay totally old school that is.
And do it with the older tools.
I also just looked over an old book I've got on Assembly language subroutines for DOS... looks like you can do it THAT way too, but I've never USED that. I'm laughing as I look at it... I have used Quick Basic and PDS.
but, honestly Sounds MUCH easier to do it gurukid22's way and use scripting functions that are available.