Skip to content

Instantly share code, notes, and snippets.

@doza
Created December 22, 2016 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doza/e67b770edb40f27ad671eec255e9ff6a to your computer and use it in GitHub Desktop.
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?
@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
)
@doza
Copy link
Author

doza commented Dec 22, 2016

How to make it snow on your Windows desktop:

  1. Save this file as snow.bat or whatever else you'd like to call it.
  2. Double-click the file.
  3. Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment