Screen capture in DOS

3

1

Is it possible to capture screen in MS-DOS and save the screen as a JPEG image?

Siddiqui

Posted 2010-06-16T07:17:27.457

Reputation: 301

3Do you really mean DOS or do you mean the command prompt under Windows? – None – 2010-06-16T07:30:34.320

No I mean DOS only DOS without window OS. – Siddiqui – 2010-06-16T07:33:01.037

2Good luck with that. Me, I'd break out the digital camera and take a quick snapshot, then load it into a real OS :-) – None – 2010-06-16T07:35:32.390

Using virtual machine will be way easier than writing your own resident program, and dealing with all possible DOS screen modes. You may also want to google for "MS-DOS printscreen" - people mention some freeware software for that. – None – 2010-06-16T07:53:06.423

Do you mean a command line OS or IBM Disk Operating System? – music2myear – 2011-10-05T19:23:06.220

Answers

8

You could use a virtual machine (for example VMWare Player or VirtualBox) and run DOS within that. Then (as it is running in a window), you could create a screenshot for that window.

Other than that: I can remember that there used to be TSR ("terminate but stay resident") programs for DOS that stored the content of the screen (ASCII characters) as text files when pressing a key, but of course they could not store any colors.

Thorsten Dittmar

Posted 2010-06-16T07:17:27.457

Reputation: 276

2

If you are using Windows you may use cmd to call a console. Then you an use the print screen funtion to create an image.

Using Debian you may use a terminal and the built in screenshot functionality.

But i guess you are reffering to a real command only environment. In that case you will need to have another program (TSR) to run in the background which will listen to a key combination to either print or save your screen.

Doscap.exe seems to be one of those programs, but i wasn't able to find a place where you can download it.

EDIT: Looks like i found what you need here. It is a collection of dos utilities, have a look at Screen Capture v2.01.

Thariama

Posted 2010-06-16T07:17:27.457

Reputation: 762

2

Just recently I needed to take screenshots in DOS and looked up some old programs I used way back when as well as some new ones. Among the best were

There is also a shareware one called Grabber and another freeware one called Capture.

A few things should be pointed out:

  1. Some capture in ASCII mode (ie, create text/ANSI files) while others capture graphics (ie, create JPG/BMP) files. (Either way, you can convert the results manually.)
  2. They may not work depending on the screen. Usually they work by installing a TSR to intercept screen writes. That means that something that is output via direct hardware writes cannot be captured unless the software has the ability to read the graphics card's buffer/memory.

Bobson

Posted 2010-06-16T07:17:27.457

Reputation: 709

1

if you simply need to save the output of a command in a file you can simply use the ">" to redirect it

dir > test.txt

will redirect the directory listing to a text file called test.txt

Paper-bat

Posted 2010-06-16T07:17:27.457

Reputation:

I have a GUI which is running on DOS, I want to capture the screen of GUI. – Siddiqui – 2010-06-16T07:35:14.357

@Arman Isn't DOS just some white text on a black screen ? – DrDro – 2010-06-16T07:38:16.343

@DrDro, I have my own application in DOS, which I want to capture. – Siddiqui – 2010-06-16T07:40:38.587

1Shows how much you know DrDro - you can do fullscreen apps in DOS. In fact Windows 3.1 needed DOS! – graham.reeds – 2010-06-16T07:53:56.687

@graham Shows how much I got misleaded by the original question not mentioning any app. But thanks for the lesson... – DrDro – 2010-06-17T06:33:46.543

1

Just to throw it out there for a programmatic solution - read out current screen's memory buffer, get the character map bitmap from the graphics card, get the color palette for all 32 text-mode colors, put it all together, build a graphics file using all this data and compress as .jpg.

But capturing the screen from a VirtualBox machine should be probably easier. ;)

macbirdie

Posted 2010-06-16T07:17:27.457

Reputation: 1 661

0

I remember there used to be a DOS program called screenthief, perhaps look for that.

James

Posted 2010-06-16T07:17:27.457

Reputation:

0

If you are using DOS-prompt in Windows, press Alt-PrintScreen. It copies the current window (for example the DOS-prompt window) into clipboard. (The DOS-prompt must be displayed in a window, not full screen).

Pressing PintScreen or Ctrl-PrintScreen copies the whole screen.

You can then paste it in an image editing application such as Paint and then save as JPG (or preferably as PNG which is non-destructinve format).

If you are using real MS-DOS (which was still distributed with Windows-98), you can press PrintScreen to print text screen on your default printer. To grab the text (perhaps with color) or graphical screen into a file, you need a screen capture program. Some may still be available, Google for MS-DOS screen capture.

Pauli L

Posted 2010-06-16T07:17:27.457

Reputation: 181