Created
August 22, 2012 09:47
-
-
Save jp311/3424072 to your computer and use it in GitHub Desktop.
批处理中显示进度
This file contains hidden or 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 enabledelayedexpansion | |
| set "progress=-\|/" | |
| for /l %%i in (0, 1, 100) do ( | |
| REM 取余运算符为 %%,帮助里的 "%" 方式无效 | |
| set /a p=%%i %% 4 | |
| cls | |
| call set "o=%%progress:~!p!,1%%" | |
| echo Progressing: !o! | |
| REM Handle command | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment