(view source code of whois.bat as plain text)
@ECHO OFF
ECHO.
:: Windows and OS/2 only
SET OS_OK=0
VER | FIND /I "Windows" >NUL
IF NOT ERRORLEVEL 1 SET OS_OK=1
VER | FIND /I "OS/2" >NUL
IF NOT ERRORLEVEL 1 SET OS_OK=1
VER | FIND /I "eCS" >NUL
IF NOT ERRORLEVEL 1 SET OS_OK=1
IF %OS_OK%==0 GOTO Syntax
:: Check command line parameter
IF [%1]==[] GOTO Syntax
ECHO.%1 | FIND "?" >NUL
IF NOT ERRORLEVEL 1 GOTO Syntax
SET Dom_OK=0
ECHO.%1 | FIND /I ".com" >NUL
IF NOT ERRORLEVEL 1 SET Dom_OK=1
ECHO.%1 | FIND /I ".net" >NUL
IF NOT ERRORLEVEL 1 SET Dom_OK=1
ECHO.%1 | FIND /I ".org" >NUL
IF NOT ERRORLEVEL 1 SET Dom_OK=1
IF %Dom_OK%==0 GOTO Syntax
:: NT and OS/2 should enclose the URL in quotes
ECHO.%COMSPEC% | FIND /I "CMD.EXE" >NUL
IF NOT ERRORLEVEL 1 GOTO NT_OS2
START "http://www.netsol.com/cgi-bin/whois/whois?STRING=%1&SearchType=do&STRING2.x=40&STRING2.y=15"
GOTO End
:NT_OS2
START "WhoIs" "http://www.netsol.com/cgi-bin/whois/whois?STRING=%1&SearchType=do&STRING2.x=40&STRING2.y=15"
GOTO End
:Syntax
ECHO WHOIS, Version 2.00 for Win32 and OS/2
ECHO Show WHOIS database entry for the specified domain.
ECHO.
ECHO Usage: WHOIS domainname.tld
ECHO Where: domainname.tld can be any valid .COM, .NET or .ORG domain
ECHO.
ECHO Note: Rename this batch file to *.CMD to use it in OS/2
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
:End
SET OS_OK=
SET Dom_OK=
page last modified: 2024-04-16; loaded in 0.0066 seconds