Perl already does that for you and does a better job of it. (:
In reply to Re: Re: How do I run a .bat file? by tye in thread How do I run a .bat file? by Etelka