Wednesday, October 31, 2012

Default Gateway Ping Test Batch File

This is a batch file that will let you test your connection status by pinging your default gateway.  Copy this code into notepad and save the file with a .BAT or .CMD extension.

@ECHO OFF
COLOR 1F
TITLE GATEWAY PING TEST
:PINGTEST
CLS
FOR /F "TOKENS=2 DELIMS=:" %%G IN ('IPCONFIG ^| find "Default Gateway"') DO (
    IF NOT "%%G"==" " (
        PING -w 30000 -n 1 %%G
        IF ERRORLEVEL 1 ECHO UNABLE TO PING GATEWAY!!!
    )
)
ECHO.
CHOICE /T 5 /D Y /M "WAITING 5 SECONDS BEFORE RETRY"
GOTO PINGTEST

*This has only been tested with Windows 7.  YMMV

Friday, October 5, 2012

Erasing or Wiping a Floppy Disk

Apparently there is a new switch to the format command that will let wipe a disk with multiple passes of writing 0 to the sector. For example:

format A: /P:3 /V:

will erase disk A: writing 3 passes of zero on each sector. "/V:" is for blanking the volume label. The disk is still usable but the old data is not recoverable. (Checked with PC Inspector File Recovery) This works with Vista and higher.