How to set Timmer in Batch file ?
How to shutdown computer after 3 hours ??
| Syntax | |||
| timeout | goto | :start | \t /s |
Description:-
This timeout command useful for pausing batch file, number of seconds
Examples:-
timeout /t 100
Pause programme for 100 seconds. /t back slash t
Sample programme 1 :-
How to find statistic of internet data line for one-hour.
@echo off
:: create file name shut.bat
timeout \t 300
:: pause batfile runing in 300 seconds
shutdown /s \t300
:: shutdown computer after conting 300 seconds
exit
Sample programme 2 :-
@echo off
:: create file name record.bat
::record directory listing every 5 minutes
:start
dir c:\bat\*.* >> c:\bat\dirlist1.txt
timeout \t 300
:: 300 equal to 5 minutes
goto start
exit
-----------------------

No comments:
Post a Comment