“Watch” command in Windows

These days I needed to be able to check on the execution of a repetitive task. If I would use linux I could use the watch command but I am a Windows guy.

So I came up with an alternative – I created a bat file with the below content:

  timeout /t 5
goto loop

To change the duration of the loop change the timeout /t 5 value (now it is 5 seconds).

Usage is similar to linux: watch dir *.jpg

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.