(view source code of pict.bat as plain text)
@ECHO OFF
ECHO.
ECHO Pict_NT.bat, Version 2.00 for Windows NT 4 and later
ECHO Displays all GIFs and JPEGs in a HTML file.
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
ECHO.
IF NOT "%OS%"=="Windows_NT" GOTO:EOF
IF NOT EXIST *.GIF IF NOT EXIST *.JPG IF NOT EXIST *.JPEG GOTO:EOF
SETLOCAL
:: Get code page
FOR /F "tokens=*" %%A IN ('CHCP') DO FOR %%B IN (%%A) DO SET CodePage=%%B
IF %CodePage% LSS 1000 (SET CharSet=ibm%CodePage%) ELSE (SET Charset=windows-%CodePage%)
SET Version=2.00
SET OutFile="%~n0.htm"
> %OutFile% ECHO ^<html^>
>> %OutFile% ECHO ^<head^>
>> %OutFile% ECHO ^<title^>All GIFs and JPGs found in directory %CD%^</title^>
>> %OutFile% ECHO ^<meta http-equiv="content-type" content="text/html; charset=%CharSet%" /^>
>> %OutFile% ECHO ^<style type="text/css"^>img{max-width: 100%%;}^</style^>
>> %OutFile% ECHO ^</head^>
>> %OutFile% ECHO ^<body^>
>> %OutFile% ECHO ^<div style="text-align: center"^>
>> %OutFile% ECHO ^<h1^>All GIFs and JPGs^</h1^>
>> %OutFile% ECHO ^<h2^>found in directory^</h2^>
>> %OutFile% ECHO ^<h2^>%CD%^</h2^>
FOR %%A IN (*.GIF) DO (
>> %OutFile% ECHO ^<p^>^ ^</p^>
>> %OutFile% ECHO ^<p^>^<img src="%%~nxA" /^>^</p^>
>> %OutFile% ECHO ^<p^>%%~nxA^</p^>
)
FOR %%A IN (*.JPG) DO (
>> %OutFile% ECHO ^<p^>^ ^</p^>
>> %OutFile% ECHO ^<p^>^<img src="%%~nxA" /^>^</p^>
>> %OutFile% ECHO ^<p^>%%~nxA^</p^>
)
FOR %%A IN (*.JPEG) DO (
>> %OutFile% ECHO ^<p^>^ ^</p^>
>> %OutFile% ECHO ^<p^>^<img src="%%~nxA" /^>^</p^>
>> %OutFile% ECHO ^<p^>%%~nxA^</p^>
)
>> %OutFile% ECHO ^<p^>^ ^</p^>
>> %OutFile% ECHO ^<p^>This HTML page was generated using^</p^>
>> %OutFile% ECHO ^<p^>Pict_NT.bat, Version %Version%^</p^>
>> %OutFile% ECHO ^<p^>Written by Rob van der Woude^</p^>
>> %OutFile% ECHO ^<p^>^<a href="http://www.robvanderwoude.com"^>http://www.robvanderwoude.com^</a^>^</p^>
>> %OutFile% ECHO ^</div^>
>> %OutFile% ECHO ^</body^>
>> %OutFile% ECHO ^</html^>
START "Pict_NT.bat" %OutFile%
ENDLOCAL
GOTO:EOF
page last modified: 2024-04-16; loaded in 0.0108 seconds