Skip the navigation

DOS lives! Secrets of the Windows command prompt

Don't be afraid of a little typing. Lots of good old DOS commands still work in Windows, and often they're the best choice for quick and efficient work.

By Dan Gookin
October 11, 2007 12:00 PM ET

Computerworld - Buried deep within Windows' bosom is a carbon-crusted fossil from the ancient days of computing. This aged wart on Windows' soul harkens back to a more primitive time, when computers lacked the oomph to go graphical and mice were nothing but rodents.

I speak of the command prompt, whose roots lie in DOS, that antique operating system of the 1980s. DOS is gone now. Most old DOS programs lost Windows compatibility after the release of Windows 98, and Microsoft even held a mock funeral for the once-dominant PC operating system about a decade ago.

Yet despite Windows' glorious graphical goodness, a wispy memory of text-based computer life still exists. It's a program called CMD.EXE, and it appears in Windows as the command prompt window.

Believe it or not, the command prompt to this day still serves as a useful alternative way to control your computer. Indeed, there are some things you can do in the command prompt window that in Windows' graphical interface are tedious, slow or darn near impossible.

Come with me as we discover how an old warhorse like DOS can once again find purpose.




Secrets of the Windows command prompt



Command prompt 101

Text commands, while obscure, are potent. Armed with the right commands and the know-how to use them, you can, even in 2007, fully control any Windows computer from your keyboard alone.

The command prompt window isn't really text mode, not like the old days. Rather, it emulates text mode.

In fact, over the years, Microsoft has continued to make the command prompt more and more powerful. Rumor has it that some Windows programmers at Microsoft almost exclusively use the command prompt to configure and run their systems. Given the richness and breadth of the text mode commands, it's easy to see why.

For now, let's begin by opening the command prompt window. Click the Windows Start menu, click All Programs, choose the Accessories submenu, choose Command Prompt, et voila, you should be looking at a standard command prompt window.

The command prompt window emulates the old full-screen text mode of yesteryear in a small window on your screen. Inside the window you should see 80 columns by 25 rows of text. A command prompt (which begins with C:\) indicates what directory you're currently in. And a blinking cursor shows you where to type your text. It's all cryptically simple.

What you type at that prompt are commands. Later on, we'll test drive a whole passel of commands, some as ancient as the first version of DOS back in 1981, some brand new with Windows Vista, but for now, just type

VER

and press Enter. You should see text telling you the current version of your operating system, similar to what's shown in Figure 1, below.

type VER to see which version

Figure 1. Typing VER at the command prompt tells you which version of Windows you're running.

 

Before digging further into the command prompt, here are a few things to keep in mind when working at the command prompt level:

  • Commands can be typed in uppercase or lowercase. Traditionally, DOS commands are written in ALL CAPS, as we're doing in this story, but you don't have to type them that way.
  • Anything you type is ignored until you press the Enter key. You can use the Backspace key to back up and erase. You can also use the left and right arrow keys to edit text.
  • You can quickly summon a previous DOS command by pressing the up arrow key. Pressing the up arrow key repeatedly pages back through the past several commands you've typed at the prompt.
  • The Cancel sequence in DOS is Ctrl+C.
  • Yes, the error messages are cryptic and useless. Welcome to 1988!
  • You can change the size and appearance of the command prompt window itself. For pointers, see the sidebar Working the window.
  • To finish your DOS session, simply close the window. Or if you want to be completely texty about things, type EXIT to make the command prompt window go bye-bye, just like in the old days.


DOS

Additional Resources
ESG - What's Needed for Cloud Computing
WHITE PAPER
Just what is cloud computing anyway? Skeptics might say it is nothing but industry hyperbole, visionaries might say it is the future of IT. In reality, both statements are true - cloud computing has been embellished by the tech industry but it does hold real potential for new types of on-demand dynamic IT services. This paper seeks to clarify the definition of cloud computing, identify how far along users are in terms of cloud deployment, and examine the role of the network in the cloud computing model.
Driving Storage Efficiency in SAN Environments
WHITE PAPER
This ESG paper outlines the considerations for architecting an efficient SAN data storage infrastructure with a focus on the NetApp solutions for increased utilization, improved performance and streamlined protection to reduce operational costs.
Get a Quick ROI from Being Green
WEBCAST
The menu of green initiatives is long, but how do you get an early win with a solid ROI? Enterprise Print Services address sustainability issues well beyond paper usage. Learn how you can get an assessment of enterprise printing to identify underutilized devices, reduce energy consumption, cut waste, and free-up valuable space.
What People Are Saying
Operating Systems White Papers
Windows Done Right: From Migration to Implementation
The recent IDC executive brief, "Doing Windows 7 Right: Efficiency from Migration to Implementation" offers a better understanding on how the migration to...
Lessons Learned from Windows 7 Early Adopters
According to Windows 7 early adopters, there are benefits to moving to Windows 7 sooner rather than later. But regardless of when you...
Red Hat Enterprise Linux: A Higher Value and Lower Cost Alternative
Read More about Red Hat's Alternative to Microsoft Windows Server 2008.
Linux and Solaris: An Analysis of Two Strategies
Read more about the analysis that aids in the selection of the most appropriate platform for enterprise environments
Strategic Migration Planning: Sun Solaris to Red Hat Enterprise Linux
Many of these organizations have chosen to migrate from proprietary technologies, such as Sun® Solaris®, to alternatives based on open standards like Red...
All Operating Systems White Papers
Operating Systems Webcasts
The Smart Route to Windows 7
Join IDC analyst Al Gillen as he presents findings from "Windows 7 Done Right: Efficiency from Migration to Implementation" to demonstrate how planning...
IDC Webcast: Linux Adoption in a Global Recession
Access this webcast, compliments of Novell and HP, for a limited time only!
Bringing Order and Security to your Mobile Workforce: Corporate Mobility Policy and Device Management
Download this webcast, free, compliments of Nokia.
Guiding Principles for Healthcare in Transformation
EMC Consulting has developed guiding principles for information technology in healthcare provider institutions. These aren't technical points. They're the kinds of guidelines that...
Desktop virtualization keys innovation drive
View now.
All Operating Systems Webcasts
IT Jobs