Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding time even to a BATCH File

21 views
Skip to first unread message

Moises

unread,
Apr 21, 2008, 10:25:44 AM4/21/08
to
How to make a batch file to ping 1 IP every 3 Minutes.???

Herman D. Knoble

unread,
Apr 21, 2008, 10:59:23 AM4/21/08
to
On Mon, 21 Apr 2008 07:25:44 -0700 (PDT), Moises <abraham...@gmail.com> wrote:

-|How to make a batch file to ping 1 IP every 3 Minutes.???

you may wish to see: http://malektips.com/dos0017.html

Skip

Herman D. Knoble

unread,
Apr 21, 2008, 11:47:21 AM4/21/08
to
On Mon, 21 Apr 2008 10:59:23 -0400, Herman D. Knoble <SkipKno...@SPAMpsu.DOT.edu>
wrote:

-|On Mon, 21 Apr 2008 07:25:44 -0700 (PDT), Moises <abraham...@gmail.com> wrote:
-|

-|-|How to make a batch file to ping 1 IP every 3 Minutes.???
-|
-|you may wish to see: http://malektips.com/dos0017.html
-|
For example:

WAIT.BAT:
@Echo off
if not "%1" == "" GoTo Sleep
Echo Syntax: Wait nn will wait for nn seconds.
GoTo Done
:Sleep
ping 127.0.0.1 -n 2 -w 1000 > nul
ping 127.0.0.1 -n %1% -w 1000> nul
:Done

TIMEIT.BAT
@echo off
rem Set the prompt to the time of day.
prompt $t$g
if exist %1.BAT GOTO CALLIT
echo on
%1 %2 %3 %4 %5 %6 %7 %8 %9
echo off
GOTO WRAPUP
:CALLIT
echo on
CALL %1 %2 %3 %4 %5 %6 %7 %8 %9
echo off
:WRAPUP
rem Restore the usual prompt.
echo on
prompt $p$g


EXAMPLE OF USE

timeit wait 180

Output:
11:42:54.45>CALL wait 180

11:45:54.56>prompt $p$g

Skip

Moises

unread,
Apr 21, 2008, 1:10:49 PM4/21/08
to
Thank you, but it seems that is not working,

can you please show me if i want to ping

192.168.1.1 and wait 30 Sec.

that is what i dont get.


Thank you very much for your help./

Herman D. Knoble

unread,
Apr 21, 2008, 2:33:22 PM4/21/08
to
On Mon, 21 Apr 2008 10:10:49 -0700 (PDT), Moises <abraham...@gmail.com> wrote:

-|Thank you, but it seems that is not working,
-|
-|can you please show me if i want to ping
-|
-|192.168.1.1 and wait 30 Sec.
-|
-|that is what i dont get.
-|
-|
-|Thank you very much for your help./

Create a .bat file, say pingit.bat:

@echo off
:repeat
ping 192.168.1.1
call wait 30


if you want to repeat this just add
the line: goto repeat

Then just invoke pingit.bat

(To stop the infinite loop, just press Ctrl-C )

Skip

Herman D. Knoble

unread,
Apr 22, 2008, 8:18:20 AM4/22/08
to
On Mon, 21 Apr 2008 14:33:22 -0400, Herman D. Knoble <SkipKno...@SPAMpsu.DOT.edu>
wrote:

-|On Mon, 21 Apr 2008 10:10:49 -0700 (PDT), Moises <abraham...@gmail.com> wrote:
-|

-|-|Thank you, but it seems that is not working,


-|-|
-|-|can you please show me if i want to ping
-|-|
-|-|192.168.1.1 and wait 30 Sec.
-|-|
-|-|that is what i dont get.
-|-|

-|-|


-|-|Thank you very much for your help./

-|
-|Create a .bat file, say pingit.bat:
-|
-|@echo off
-|:repeat
-|ping 192.168.1.1
Correctioin:
ping -n 1 192.168.1.1
-|call wait 30
-|
-|
-|if you want to repeat this just add
-|the line: goto repeat
-|
-| Then just invoke pingit.bat
-|
-|(To stop the infinite loop, just press Ctrl-C )
-|
-|Skip

0 new messages