Created
December 19, 2025 11:43
-
-
Save tnhung2011/2a8bb6fb5071343befe3a989d8b8f443 to your computer and use it in GitHub Desktop.
A spinner, demonstrating carriage return in Batch (CR thanks to Jeb - http://ss64.org/viewtopic.php?id=1344)
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
| @if (@X)==(@Y) @end /* | |
| @echo off | |
| setlocal enabledelayedexpansion | |
| ::http://ss64.org/viewtopic.php?id=1344 | |
| for /F "usebackq" %%a in (`copy /Z "%~f0" nul`) do set "cr=%%a" | |
| set /a idx=0 | |
| for %%i in (/ - \ ^|) do ( | |
| set spin.!idx!=%%i | |
| set /a idx+=1 | |
| ) | |
| :spinner | |
| for %%i in (0 1 2 3) do ( | |
| <nul set/p"=!spin.%%i!!cr!" | |
| cscript //nologo //E:JScript "%~f0" | |
| ) | |
| goto spinner | |
| */ | |
| WScript.Sleep(150); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment