Difference between revisions of "MS-DOS"

From vwiki
Jump to navigation Jump to search
(Added "Pinger")
 
m (→‎Pinger: Added annotations)
Line 1: Line 1:
== Useful Scripts ==
== Useful Scripts ==
=== Pinger ===
=== Pinger ===
This script allows you to launch multiple new instances of continuous pings
<source lang="DOS">
<source lang="DOS">
@echo Off
@echo Off


REM If there's a 2nd command line param (eg :START) go to it
If not "%2"=="" GoTo %2
If not "%2"=="" GoTo %2


Line 12: Line 14:
echo.
echo.


REM Start a new command shell with this script and command line args of %IP% :START
start Cmd /C %0 %IP% :START
start Cmd /C %0 %IP% :START
goto :GETIP
goto :GETIP

Revision as of 22:36, 28 March 2013

Useful Scripts

Pinger

This script allows you to launch multiple new instances of continuous pings

@echo Off

REM If there's a 2nd command line param (eg :START) go to it
If not "%2"=="" GoTo %2

:GETIP
set /P IP=Enter address to ping: 

echo Starting new window to ping %IP%
echo.

REM Start a new command shell with this script and command line args of %IP% :START 
start Cmd /C %0 %IP% :START
goto :GETIP

:START
title %1
@echo on
ping -t %1
@echo off
ping 127.0.0.1 > NUL
:END