Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a way to take a screenshot of the entire screen from the command line. Operating system is Windows. Something like this:

C:\>screenshot.exe screen1.png
share|improve this question
Why would you want to do something like that ? Apart from the obvious deficiency (it being able to take screenshots only of the command line you're currently working on), what's wrong with the "regular" solutions for such purpose ? – Rook Nov 26 '09 at 15:53
Why would it be restricted to take a picture of the cmd line only? I think the question goes more along the lines of automation. – Gerd Klima Nov 26 '09 at 15:57
Well, in the moment he wants to take a screenshot, he has to press enter to give the command, doesn't he ? He could of course use a script to time-activate it, but then he's really reinventing hot water. – Rook Nov 26 '09 at 16:00
I would like to write a script that opens eml file in Thunderbird, takes a screen shot, opens another file, takes another screen shoot... For all files in a folder. I want to execute screen shot tool from the command line, so it could be automated. Just to be clear, I do not want to take a screen shot of command line, but of the entire screen. In fact, I have already written the script, I am just looking for more options to take the screen shot. – Željko Filipin Nov 27 '09 at 11:10
@Idigias: first of all, the screen is larger than a CMD box, but secondly : when a script launches a GUI tool, that GUI tool takes focus. So, your "obvious deficiency" is not obvious, and no deficiency either. Have you ever worked with command line ? – tvCa Apr 13 '15 at 9:49
up vote 21 down vote accepted

Download imagemagick. Many command line image manipulation tools are included. import allows you to capture some or all of a screen and save the image to a file. For example, to save the entire screen as a jpeg:

import -window root screen.jpeg

If you want to use the mouse to click inside a window or select a screen region & save a a png, just use:

import box.png
share|improve this answer
This doesn't seem to work on Windows. I get an X server error about file not found. – Binary Phile Apr 5 '11 at 18:14
@BinaryPhile Yea I think this would only work with an X server running on Cygwin. – CMCDragonkai May 12 '14 at 8:42
It still doesn't work for me. I get a screenshot, but only the X applications show up (as expected). – reinierpost Oct 9 '15 at 13:11
hm, ImageMagick is 25 Mb, and does TON of cool stuff. screenCapture.bat, below, is 9 Kb, and simply does exactly what the OP requested. At .04% the size of ImageMagick. – johny why Apr 12 at 0:59

This question's already been answered, but I thought I'd throw this in as well. NirCmd (freeware, sadly, not open source) can take screenshots from the command line, in conjunction with the numerous other functions it can do.

Running this from the command line either in nircmd.exe's directory or if you copied it to your system32 folder:

nircmd.exe savescreenshot screen1.png

does what you want. You can also delay it like this:

nircmd.exe cmdwait 2000 savescreenshot screen1.png

That will wait 2000 milliseconds (2 seconds), and then capture and save the screenshot.

share|improve this answer
+1 for this great utility, 36.8 Kb of pure goodness – Krazy_Kaos Nov 11 '11 at 17:00
+10 this utility is awesome! – jon3laze Aug 24 '12 at 20:23
Nircmd does not support multiple screens. It will capture the primary screen only. – Thomas May 19 '15 at 8:58
Looks like the recent versions can do multiple screens. savescreenshotfull [filename] – w32sh Feb 26 at 10:47

Other suggestions are fine -- you could also try MiniCap, which is free and has some other features like flexible file naming and some different capture modes:

(disclaimer: I'm the author of MiniCap).

share|improve this answer
Then you must also be the author of Screenshot Captor. I found it a better solution for my needs. Thank you! – jon3laze Aug 24 '12 at 20:50
It is free for personal use only. For commercial use, a license for Screenshot Captor is needed. – Thomas May 19 '15 at 8:59

it can be done without external tools (you just need installed .net framework ,which is installed by default on everything from vista and above) - screenCapture.bat. It is a selfcompiled C# program and you can save the output in few formats and capture only the active window or the whole screen:

screenCapture- captures the screen or the active window and saves it to a file
screenCapture  filename.format [WindowTitle]

filename - the file where the screen capture will be saved
format - Bmp,Emf,Exif,Gif,Icon,Jpeg,Png,Tiff and are supported - default is bmp
WindowTitle - instead of capturing the whole screen will capture the only a window with the given title if there's such


call screenCapture notepad.jpg "Notepad"
call screenCapture screen.png
share|improve this answer
Definitely the best solution. Super-tiny 9K! That's 0.04% the size of ImageMagick (25 Mb). It uses built-in Windows functionality. Tinier than all other solutions on this page. Best! – johny why Apr 12 at 1:01

Try IrfanView.

You can run it via command-line. You can specify which window to capture – such as whole window or just the current/active window – and you can also do some basic editing such as sharpening, cropping or resizing the images.

Here are the command line options, particularly interesting is

i_view32 /capture=0 /convert=wholescreen.png
share|improve this answer


            Select window with this title.
            Title must not contain space (" ").
            Select window by it's handle
            (representad as hex string - f.e. "0012079E") 
            Crop source. If no WINDOW_TITLE is provided
            (0,0) is left top corner of desktop,
            else if WINDOW_TITLE maches a desktop window
            (0,0) is it's top left corner.
            Output file name, if none, the image will be saved
            as "screenshot.png" in the current working directory.
            Shows this help info.

share|improve this answer
This is open source, BSD license. Very simple and small - for me these are advantages. – Jarekczek Jan 24 '15 at 12:06

You can try the boxcutter tool:

usage: boxcutter [OPTIONS] [OUTPUT_FILENAME]

Saves a bitmap screenshot to 'OUTPUT_FILENAME' if given.  Otherwise, 
screenshot is stored on clipboard by default.

  -c, --coords X1,Y1,X2,Y2    capture the rectange (X1,Y1)-(X2,Y2)
  -f, --fullscreen            fullscreen screenshot
  -v, --version               display version information
  -h, --help                  display help message
share|improve this answer
This one supports multiple monitors but adds some extra black area in version 1.5 – Thomas May 19 '15 at 9:19

You can use snapit to take awesome screenshots from the command line.

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Diogo Aug 9 '12 at 20:11
This is now a commercial product, needs .NET and is not released for Windows 7++. The link given in the answer returns HTTP 404. – Thomas May 19 '15 at 9:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .