Difference between revisions of "MS-DOS"

Jump to navigation Jump to search
1,300 bytes added ,  12:02, 3 April 2013
→‎Useful Scripts: Added "Simple Pre-Change Config Report"
(Added "Pinger")
 
(→‎Useful Scripts: Added "Simple Pre-Change Config Report")
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Useful Scripts ==
== Useful Scripts ==
=== Simple Pre-Change Config Report ===
<source lang="DOS">
@echo off
echo Generating config report
set LOG=PreSvrMigrationCfg.txt
for /f "tokens=* delims=" %%a in ('date /t') do set date=%%a
for /f "tokens=* delims=" %%a in ('time /t') do set time=%%a
echo ***************************************************** >> %LOG%
echo Generated at %date%%time% >> %LOG%
echo IP Config...
echo. >> %LOG%
echo ############################### >> %LOG%
echo ######  I P C O N F I G  ###### >> %LOG%
echo ############################### >> %LOG%
ipconfig/all >> %LOG%
echo Route Print...
echo. >> %LOG%
echo #################################### >> %LOG%
echo ######  R O U T E  P R I N T  ###### >> %LOG%
echo #################################### >> %LOG%
route print echo >> %LOG%
echo Running Services...
echo.  >> %LOG%
echo ############################################## >> %LOG%
echo ######  R U N N I N G  S E R V I C E S  ###### >> %LOG%
echo ############################################## >> %LOG%
net start  >> %LOG%
echo Completed (%LOG%)...!
ping 127.0.0.1 >NUL
</source>
=== 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 52:
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

Navigation menu