Skip to content

Instantly share code, notes, and snippets.

@jujhars13
Created November 27, 2012 11:28
Show Gist options
  • Save jujhars13/4153770 to your computer and use it in GitHub Desktop.
Save jujhars13/4153770 to your computer and use it in GitHub Desktop.
watch.bat - watch command for windows - drop this file on your path
rem Watch.bat - trying to emulate linux watch command on windows
rem inspired by http://stackoverflow.com/questions/6765554/is-there-a-windows-command-line-equivalent-to-linux-watch-command amd http://superuser.com/questions/191063/what-is-the-windows-analog-of-the-linux-watch-command
@echo off
title Watch %1 %2 %3 %4 %5
:loop
cls
%1 %2 %3 %4 %5
echo.
timeout /t 2
goto loop
@jujhars13
Copy link
Author

watch.bat

Just drop this script as watch.bat somewhere on your path
use like this:

watch.bat dir

Which will display the current directory contents every 2 seconds

thanks

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