Hey JRK Prasad,
Got it to work, this is the final batch file that I used. However, it did say that the path to 'PlatformSearchScheduleDurationBean.java' was too long, so it couldn't be deleted. If you share out that drive, map the drive to about half way down, you can delete half the folders yourself, and then disconnect the shared drive to delete the other half.
At any rate, here is the final batch file that I used:
net stop Tomcat7&&rename "D:\www\Tomcat 7.0\work\Catalina" %Date:~-10,2%_%Date:~-7,2%_%Date:~-4,4%.Catalina&&net start Tomcat7&&rmdir "D:\www\Tomcat 7.0\work\"%Date:~-10,2%_%Date:~-7,2%_%Date:~-4,4%.Catalina /S /Q
Again, outside of the above file that couldn't be deleted, it works as expected. Also, I'm on Windows Server 2008 R2, thus I had to run this as an administrator.
Try running the above script and see if it works as you expect it to. If it doesn't, let me know what, if any, error messages you got and I'll help you work through it. Thanks,
-Victor