Created
August 22, 2023 03:42
-
-
Save RadAd/c5e5186d4a82e470cbe18fb1efe7f0f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
prompt $G$S | |
set BAR_A=######################################## | |
set BAR_B=%BAR_A:#=_% | |
set BAR_S=40 | |
set C=500 | |
echo. | |
for /L %%i in (0,1,%C%) do ( | |
call :progress %%i %C% | |
rem timeout.exe /t 1 > NUL | |
) | |
conprint "\e]9;4;0\u0007" | |
echo. | |
goto :eof | |
:progress | |
set /A P=%1*100/%2 | |
set /A A=%1*%BAR_S%/%2 | |
set /A B=%BAR_S%-%A% | |
conprint "\r[!BAR_A:~0,%A%!!BAR_B:~0,%B%!] %1/%2 %P%%%%%" | |
conprint "\e]9;4;1;%P%\u0007" | |
goto :eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment