DOS to the rescue
Published: 31 Dec 2002 11:08 GMT
As a technical writer and consultant, I am constantly working with system documentation. One frequently requested element is a catalog of documents or other electronic files stored in various network directories.
Windows 95 and later allows for long file names, allowing documents and other files to bear a descriptive label. This system is much more intuitive than the 8.3 standard -- eight-character file name and three-character extension -- used by DOS. But unlike DOS, Windows 95 and later versions offer no easy way to capture a list of file names stored in various directories.
However, several versions of Windows still provide access to MS-DOS commands. Using these commands, you can quickly and easily create lists of file names.
Version note
This technique is dependent on accessing MS-DOS. Although I've tested it only under Windows 2000, the basic technique should work under all DOS versions.
Windows Explorer
Windows Explorer combined the best features of Windows 3.1's Program Manager and File Manager into a single, powerful file-management utility. It lets you view the contents of any storage medium on your computer as icons or in an easily sortable detailed mode. It reduces many of the complexities of DOS's file management system to an easy point-and-click interface.
One thing it doesn't let you do, though, is create lists of a directory's contents. If you're viewing the Explorer address bar, you can copy the displayed path name, and by clicking twice -- not double-clicking -- on a file name, you can edit or copy that file name (see Figure A), but copying individual file names in this manner for pasting into a document isn't exactly efficient.
| Figure A |
![]() |
| You can copy individual file names to paste into a document, but with many files, the process quickly becomes tedious. |
However, DOS provides some capabilities that Windows Explorer doesn't have. By launching a DOS session, you can capture the DIR command's output in a way that lets you quickly and easily generate file listings.
To launch a DOS session, simply go to Start | Run, and then type command.com in to the resulting dialog box, as shown in Figure B. When you press Enter, a new window containing the DOS command prompt will appear.
| Figure B |
![]() |
| This shows an easy way to launch a DOS session under Windows 2000. |
The DOS DIR command
Under Windows 2000, DOS has received some upgrades. To verify the version, issue the VER command while in a Windows 2000 DOS session, and if you see the output Microsoft Windows 2000 (Version 5.00.2195), this indicates that it's a new version of DOS.










