Thursday, 5 October 2017

Creating batch file

Creating a batch file:

  1. Create a new file using Notepad
  2. Rename it as   filename.bat (select All files)
  3. copy the following Script and save
  4. Run it by double clicking it.
  5. That's it enjoy : )

-------------------------------------------------------------------------------------------------------
@echo off
echo Hey sree now i'm removing the log files
pause
sc stop Tomcat7
pause
rmdir "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\logs" /S /Q
pause
mkdir "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\logs"
pause
del "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\VIS.war"
pause
rmdir "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\VIS" /S /Q
pause
rmdir "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\work\Catalina\localhost\VIS" /S /Q
pause
sc start TomCat7
pause
echo sree it's working fine....  !!!!   : )


------------------------------------------------------------------------------------------------------

No comments:

Post a Comment