This question already has an answer here:
- batch variable string manipulation not working 1 answer
Here's my code, (i tried to make a progress bar but failed).
http://pastebin.com/JpUT3QvY
I get this as output: bar:~0,1 bar:~0,2 bar:~0,3 etc.. etc.. I want it to go like:*, **, ***
etc.. basically increase the asterisk by 1 every 1 second.
Any help is much appreciated, i tried many different structures but failed.
Now i need to keep writing just so this filter can accept my question since it wants me to write more using proper grammar now you can stop reading as this is completely irrelevant to the question.
@echo off & setlocal enabledelayedexpansion
set bar=**********
set cnt=0
:LOOP
cls
set /A cnt+=1
echo.Progress:!bar:~0,%cnt%!
ping -n 1 www.google.com > nul 2>&1
if "%cnt%" NEQ 10 goto :LOOP
echo.finished.
pause > nul
exit /b