@ECHO OFF REM.-- Prepare the Command Processor SETLOCAL ENABLEEXTENSIONS REM -- REM -- Copyright note REM -- This script is provided as is. No waranty is made, whatso ever. REM -- You may use and modify the script as you like, but keep the version history with REM -- recognition to https://www.dostips.com in it. REM -- REM Version History: REM XX.XXX YYYYMMDD Author Description SET "version=01.000" &:20051201 p.h. initial version, origin https://www.dostips.com SET "version=01.001" &:20060122 p.h. Fix missing exclamation marks in documentation (https://www.dostips.com) SET "version=01.002" &:20060218 p.h. replaced TEXTAREA with PRE XMP (https://www.dostips.com) SET "version=01.003" &:20060218 p.h. php embedding (https://www.dostips.com) SET "version=01.004" &:20060723 p.h. fix page links for FireFox (https://www.dostips.com) SET "version=01.005" &:20061015 p.h. invoke HELP via '"call" help', allows overriding help command with a help.bat file (https://www.dostips.com) SET "version=01.006" &:20061015 p.h. cleanup progress indicator (https://www.dostips.com) SET "version=01.007" &:20080316 p.h. use codepage 1252 to support european users (https://www.dostips.com) SET "version=02.000" &:20080316 p.h. use FOR command to generate HTML, avoids most escape characters (https://www.dostips.com) SET "version=02.001" &:20100201 p.h. now using css and xhtml SET "version=02.002" &:20130829 p.h. excluding new SC command in Win7 and Vista to avoid hanging REM !! For a new version entry, copy the last entry down and modify Date, Author and Description SET "version=%version: =%" for /f "delims=: tokens=2" %%a in ('chcp') do set "restore_codepage=%%a" chcp 1252>NUL set "z=%~dpn0.htm" rem echo.^ >"%z%" echo.^ >"%z%" set "title=DOS Command Index" for /f "tokens=*" %%a in ('ver') do set "winver=%%a" echo.Creating the header ... for %%A in ( "" "
" "" "Windows Version | : | %winver% |
Document Source | : | "
" https://www.dostips.com " " https://www.dostips.com/%~nx0.php" " |
Created by | : | "
" %~nx0 Source Code below |
%%a | %%b |
" ) do echo.%%~A>>"%z%" call help %%a >>"%z%" 2>&1 echo ^ >>"%z%" for %%A in ( "
" ) do echo.%%~A>>"%z%" type "%~f0" >>"%z%" echo.Creating the footer ... echo ^ >>"%z%" for %%A in ( "