Pages

Sunday 19 January 2014

Create a Batch File Timer


Dear Friends,

Here you will learn to create a Batch File Timer.This app can be used as a countdown timer.



Steps

1.Open Notepad and copy the below code
  
       @echo off
       title Timer
       set time=30 
       pause
       :loop
       set /a time=%time%-1
       if %time%==0 goto timesup
       echo %time%
       ping localhost -n 2 > nul
       goto loop
       :timesup
       echo Time is Up!
       echo Press Any Key To Exit!
       pause >nul
       exit

2. Now Save As Timer.bat (Any name with .bat will do)
3. Change Save As Type to All Files and Save
4. Open Timer.bat, It will ask  "Press any key to continue"
5. Press any key and see the countdown starts......





Conclusion

 I have set the timer to 30, you can change it as you like :-)

 Enjoy!!!


You may also like



2 comments:

  1. Amazing article.loved reading every bit.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete

 

About Me

I am Tijo Tom, a Computer Engineer from India.Right from my schooling, I had a passion for Programming, PC Tricks, Virus Creation and Hacking.

I started this blog on Jan 1, 2014 to share my views and ideas with the world.

You can know more about me on