Why DOS is Even Better with Windows 2000
SUMMARY: A few tips on how DOS commands have been enhanced in Windows 2000 to make you more productive.
Yes, Windows 2000, based on the NT platform, an operating system that technically is not even built on top of DOS, has a really good DOS prompt. No kidding! I do a lot of Java development with Windows 2000 (no, I'm not making coffee, I'm programming). This type of works causes me to use the DOS prompt a whole lot. With Windows 2000, there are two features I use all the time that dramatically increase my productivity.
I open a lot of windows on the screen at once. Not just one or two, but perhaps ten or twenty. Among these windows are several DOS prompts. I may have one prompt to FTP programs to and from a central server (yes, you can FTP in DOS - read the other tips in MalekTips for more information or ask about it in the forums and I'll be glad to help). I may have one prompt to compile programs, one to debug applications, one to browse around my hard drive, etc.
If I have four web browsers open and I look on the taskbar to find a browser, I don't just see "MSIE", "MSIE", "MSIE", and "MSIE". I'd see "MalekTips.Com", "AnotherWebsite.something", "Screensavers", or other descriptive titles. However, when I look on the taskbar for a specific DOS prompt, I would normally see such descriptive (sic) titles as "Command Prompt", "Command Prompt", "Command Prompt", and "Command Prompt".
Windows 2000 has a nice TITLE command whereby I can type
TITLE a descriptive title here
at a DOS prompt, and suddenly the window's title changes to what I specify! No more looking on the taskbar guessing for which prompt I need to access; the DOS prompt titles are now as descriptive as any other application's titles.
CD Around the Drive
Windows 95 brought long filenames into the mainstream Windows world (yes, there were software packages that brought long filenames into the Windows 3.1 world, but I did say *mainstream*). Unfortunately, if you've ever dealt with running the "CD" (change directory) command to change directories, you'll run into two big problems thanks to long filenames.
1. Filenames with spaces require being prefixed and suffixed with a quotation mark. Else, DOS just spits out "Bad Command or Filename" until you are blue in the face.
2. Long filenames take a real, real long time to type. And most people don't like to do a lot of typing.
Windows 2000 helps fix both of these problems! No longer must you remember to type
CD "my crazy directory name"
after you accidentally type
CD my crazy directory name
several times, spit at your command, perhaps say a few not-very-nice things to your box, scream, etc., and lose productivity. Windows 2000 allows you to just type
CD my crazy directory name
and it will process your request with ease.
Regarding the long directory names; a hack has been circulating around the Internet on how to let your Windows NT 4.0 DOS prompt perform Unix-style path completion with the TAB key. What this means is that if you have a directory structure like so:
C:\pics - sports
C:\pics - ocean
C:\pics - kitchen
you can just type
and start pressing the TAB key a few times. The DOS prompt would then cycle through the list of directories and let you easily select the one you want.
This trick, however, required making a registry hack under Windows NT 4.0, and many people feel very uncomfortable doing this to their machine. And others would get angry looks from their IT staff for suggesting such a thing. Worry no longer! Most Windows 2000 implementations have this feature built in, and Windows 2000 lets you do path completion another way, the DOS prompt way.
Remember wildcards? Remember "*" means select all? Well, a modified version of this is possible with Windows 2000. You can type CD partialdirectoryname*, and Windows 2000 would look for the first directory name starting with "partialdirectoryname" and would CD to that directory.
So, for the above example, if you want to save a few keystrokes looking at your kitchen pictures, you can just type the following:
CD \pics - k*
Windows 2000's DOS prompt will then take you to directory "c:\pics - kitchen".
Neat, huh? These are just a few of the many features Windows 2000 adds to the DOS prompt over earlier versions of Windows. And you thought DOS was dead? DOS may not be glamorous, but for system administrators and power computer users, it can often be the right tool for a job.
Return to the Windows 2000 and DOS page.
blog comments powered by Disqus