Take screenshots forever using Dos

By xngo on February 28, 2019

@ECHO OFF

REM ******************************************************************************
REM Description: This script will take screenshots every 10 seconds forever.
REM              Screenshots are saved into sc_[Date]_[Time].png.
REM              It requires NirCmd.exe(http://www.nirsoft.net/utils/nircmd.html)
REM ******************************************************************************
 
 
:Loop
 
SET Unique=%date%_%time%
SET Unique=%Unique:/=.%
SET Unique=%Unique::=.%
SET Unique=%Unique: =%
SET Unique=%Unique:Mon=%
SET Unique=%Unique:Tue=%
SET Unique=%Unique:Wed=%
SET Unique=%Unique:Thu=%
SET Unique=%Unique:Fri=%
SET Unique=%Unique:Sat=%
SET Unique=%Unique:Sun=%
 
echo %Unique%
 
REM Save screenshots every 10 seconds.
nircmd.exe cmdwait 10000 savescreenshot sc_%Unique%.png
 
SET Unique=&::
 
GOTO Loop

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.