@echo off
chcp 65001
setlocal enabledelayedexpansion
set "_spc= "
set "_bar=■■■■■■■■■■"
set "_msg= 진행바."
for /f %%a in ('copy/Z "%~dpf0" nul')do for /f skip^=4 %%b in ('echo;prompt;$H^|cmd')do set "BS=%%b" & set "CR=%%a"
for /l %%L in (1 1 10)do nul timeout.exe 1
endlocal & color & goto :eof
=================================================
@echo off
setlocal EnableDelayedExpansion
rem Count the number of files in this dir (just as an example)
set n=0
for %%f in (*.*) do set /A n+=1
rem Fill "bar" variable with 70 characters
set "bar="
for /L %%i in (1,1,70) do set "bar=!bar!X"
rem Fill "space" variable with filler spaces
set "space="
for /L %%i in (1,1,110) do set "space=!space!_"
rem "Process" the files and show the progress bar in the title
set i=0
echo Processing files:
for %%f in (*.*) do (
set /A i+=1, percent=i*100/n, barLen=70*percent/100
for %%a in (!barLen!) do title !percent!%% !bar:~0,%%a!%space%
echo !i!- %%f
ping -n 2 localhost > NUL
)
pause
'유용한 배치파일' 카테고리의 다른 글
현재 디스크 확인 (2) | 2022.11.30 |
---|---|
AnyDesk 잔존파일 삭제 (15) | 2022.06.18 |
SDI 자동 설치 스크립트 (1) | 2022.03.18 |
윈도우가 설치된 파티션 찾기 (2) | 2022.02.21 |
Wim 파일 추출 (1) | 2022.01.05 |