Save many screenshots without too many clicks

1 June 2024

I had a situation where I needed to save many screen shots of one application on my Windows box

Windows + PrtSrn saves a screenshot to a file, but it captures all four of my monitors.

The solution I came up with is as follows.

I am using nirsoft.exe from ... to do the actual capture. In is it my path, so I can just use if from in my Poweshell session.

nircmd.exe savescreenshot screenshot.png

This saves a screenshot of my primary screen to the current directory.

Let's add a bit more logic:

$i = 1;$name="TheName"
nircmd.exe savescreenshot "$($name)-$($i.ToString("000")).png" 950 100 1100 1260;$i++

First we define a counter and a name for the files to be saved, we can also specify a part of the screen to be captured. x y width and height, x = , y = 0 denotes the top-left corner of your screen.

After running the screenshot we increase our counter.

Now on the main screen open the app to be captured, on a second screen use a PowerShell session to run the command.

Each time you need to capture a new screen, all you need to do in the Powershell Windows is Tab+Up and Return.

You will then end up with files like this:

TheName-001.png
TheName-002.png
TheName-003.png
TheName-004.png

Tags: Tools | Windows

Pages in this section

Categories

ASP.Net | Community | Development | IIS | IT Pro | Security | SQL (Server) | Tools | Web | Work on the road | Windows