(view source code of progressmeter.bat as plain text)
@ECHO OFF
:: ******************************************************************:ProgressMeter:: 2007_01_10 by rholt:: core2quad@rogers.com:: This subroutine displays a progress meter in the titlebar of:: the current CMD shell window.:::: Input: %1 must contain the current progress (0-100):: Return: None:: ******************************************************************:: Calculate the number of vertical bars then spaces based on the percentage value passedSETLOCAL ENABLEDELAYEDEXPANSION
SET ProgressPercent=%1
SET /A NumBars=%ProgressPercent%/2
SET /A NumSpaces=50-%NumBars%
:: Clear the progress meter imageSET Meter=
:: Build the meter image using vertical bars followed by trailing spaces:: Note there is a trailing space at the end of the second line belowFOR /L %%A IN (%NumBars%,-1,1) DO SET Meter=!Meter!I
FOR /L %%A IN (%NumSpaces%,-1,1) DO SET Meter=!Meter!
:: Display the progress meter in the title bar and return to the main programTITLE Progress: [%Meter%] %ProgressPercent%%%
ENDLOCAL
GOTO :EOF
page last modified: 2025-10-11; loaded in 0.0066 seconds