View Full Version : Code for Making Circular progress bar(or loading bar) in cmd(Batch or .bat)
Newbie-repacker
11-05-2021, 09:25
Like this is an example of rectangular box
@echo off
color 0A
setlocal EnableDelayedExpansion
set Counter=10
set Schalter=100
set Width=100
:1
set /a Counter=%Counter% + 1
set /a Display=%Counter% / 2
FOR /L %%A IN (1,1,%Display%) DO (
set Display=!Display!█
)
cls
echo Loading... %Counter%%%
echo █!Display:~2,47!
ping localhost -n 1 >nul
if "%Counter%" == "93" endlocal & goto End
goto 1
:End
cls
And if such is this possible in batch to make circular progress bars??
How to make such with circular progress bar......????
Joe Forster/STA
11-05-2021, 12:17
Like this is an example of rectangular box
And if such is this possible in batch to make circular progress bars??
How to make such with circular progress bar......????
Sorry, that rectangular box doesn't appear correctly in my browser. What do you mean by a "circular progress bar"? Here's a modified version with a rotating hyphen:
@echo off
color 0A
setlocal EnableDelayedExpansion
set Counter=10
set Schalter=100
set Width=100
set "RotateChars=-\|/"
:1
set /a Counter=%Counter% + 1
set /a Display=%Counter% / 2
set /a RotateIndex=%Counter% %% 4
set "RotateChar=!RotateChars:~%RotateIndex%,1!"
FOR /L %%A IN (1,1,%Display%) DO (
set Display=!Display!█
)
cls
echo Loading... %Counter%%% ^%RotateChar%
echo █!Display:~2,47!
ping localhost -n 1 >nul
if "%Counter%" == "93" endlocal & goto End
goto 1
:End
cls
Newbie-repacker
11-05-2021, 20:04
Looking for something like this in .bat
Not exactly like this but somewhat near to this.......
https://i.ibb.co/Zmqg2jG/maxresdefault.jpg (https://ibb.co/TL90WfY)
And u will have to save the above code in a .bat to get progress bar like in attachment
And it will look like this...........
https://i.ibb.co/ZNP0L32/progress-bar.png (https://imgbb.com/)
Joe Forster/STA
12-05-2021, 01:19
(I fixed the rectangular box character in the code. Make sure to preview your posts. Code pages are tricky.)
You can't draw pictures from batch files. You can work with text. (Well, you can do anything from batch files if you write additional commands in external programs and call them from batch files but what's the point of using a batch file then? This is the same problem as BASIC and machine code on microcomputers: if you understand what BASIC is capable of - pretty much nothing - then the only thing you'll use it for is to start a machine code program. ;))
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.