Did yopu notice that this is Unix shell scripts?
DOS batch has very few useful utilities and is hopeless at date manipulation. You would do best to install a perl interpreter and run a perl script (
www.perl.org)
You might manage using kixtart or an other DOS based script language but once you learn perl you'll never use anything else!