I ended up rewriting it in VBScript.

Yeah, it's better that way, but I'm so disappointed that I was unable to find a clever math solution in DOS Batch language.
_________________________
Tony Fabris