Created
December 22, 2016 18:34
-
-
Save doza/e67b770edb40f27ad671eec255e9ff6a to your computer and use it in GitHub Desktop.
Windows batch file to make it snow in a cmd terminal because why not?
This file contains 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 | |
mode con: cols=80 lines=40 | |
set "SCREEN=" | |
for /L %%i in (1,1,3200) do ( | |
set "SCREEN=!SCREEN! " | |
) | |
echo.*%SCREEN% | |
for /L %%n in (1,0,2) do ( | |
set /A "FLAKE=!RANDOM! * (80) / 32678" | |
set "LINE=" | |
for /L %%i in (1,1,!FLAKE!) do ( | |
set "LINE= !LINE!" | |
) | |
set "LINE=!LINE!*" | |
for /L %%i in (!FLAKE!,1,78) do ( | |
set "LINE=!LINE! " | |
) | |
set "SCREEN=!LINE!!SCREEN!" | |
set "SCREEN=!SCREEN:~0,3200!" | |
cls | |
echo.!SCREEN! | |
ping localhost -n 1 > NUL | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to make it snow on your Windows desktop: