IDG logo

Advertise with InfoWorld


.
 
SiteMap News Test Center Opinions Forums Careers Stock Quote Subject Indexes About Us Search Subscribe Home [Window Manager]

October 21, 1996

Make printouts of your listings with Microsoft's secret operating system

I had a lot of information in this column a few weeks ago on searching for duplicate files. I'm not going to repeat that discussion here, except to say that if you have .DLL files on your system that have the same name but are different versions, your applications may crash without warning. (There are so many exceptions to this rule that you really must get the original columns if you are interested. Point your browser to InfoWorld Electric, http://www.infoworld.com/cgi-bin /displayNew.pl?/livingst/bllist.htm, or call Customer Service at [847] 647-7925.)

Meanwhile, reader Doug McGarrett has brought up an interesting but unrelated problem. He used Windows 95's Find command to search for .DLL files. This works great, until you realize that you have a list with hundreds of files (there are more than 1,000 .DLL files on my C: drive alone), and there is no way to print or save the list from the Find window.

Going back to the Windows 3.1 File Manager doesn't help. Although many Windows 3.1 tools are actually more powerful than their Win95 counterparts (Paintbrush vs. Win95's pathetic Microsoft Paint, for example), we aren't so lucky in this situation. File Manager's Search window doesn't have a way to print or save a list, either.

There is a work-around, however. You can easily print or save a list of any set of files, sorted in almost any manner you like. All you need to know is a bit of information on a secret OS hidden within Windows itself. This small but exceptionally fast OS is a well-kept secret. Unlike most undocumented features of Windows -- which Microsoft merely neglects to talk about -- this feature is one that Microsoft actively denies even exists.

This secret operating system is, of course, DOS. We had a bit of fun when Windows 95 came out with all the claims that "there's no DOS under Windows anymore." Well, of course, DOS is still there. You boot your Win95 computer in DOS' real mode; DOS continues to run under Windows; and Windows still uses its services every time Windows opens a file and the like.

It is DOS alone (not Windows) that has the capability, amazingly, to save and print lists of files on your drives. Only DOS (not Windows) can rename a group of many files simultaneously. And only DOS (unlike Windows 95) can actually copy a giant clump of files from one location to another without making you stare at a moronic cartoon of papers sprouting wings and flying to their final resting place.

Let's take the .DLL printout problem first. You can easily output a list of files with the DOS command ATTRIB. This command lists the name of every file that matches your specifications, plus a letter showing whether each file has attributes such as Read-Only, Hidden, System, or Archive. (The Archive bit allows backup programs, other than Win95's Backup, to save only those files that have changed since your last backup.)

To create a sorted list of .DLL files and save the list to a text file, start a DOS session and type the following:

attrib c:\*.dll\s|sort/+14>c:\dll_list.txt

Once you have this text file, you can look at it in Notepad or any word processor. This allows you to look for duplicate file names at your leisure. The output of ATTRIB shows both the file name and its path location. If you don't need to save the list but just want to print it out, replace the file name at the end of the command with any text printer port, such as >lpt1 or >com1.

As for renaming files, to rename .DOC files to .BAK files, type the following:

rename c:\dir\*.doc c:\dir\*.bak

More information on any of these commands is available by typing the command name followed by a /? at a DOS prompt.

It always amazes me that functions such as these aren't available in Windows. Maybe Microsoft will build a complete set of DOS capabilities in to Explorer some day.


Brian Livingston is the co-author of the new Windows 95 Secrets and author of three other Windows books (IDG Books). Send tips to brian_livingston@infoworld.com or fax: (206) 282-1248.

Missed a column? Go back for more.


Copyright © 1996 by InfoWorld Publishing Company








HOME | NEWS | TEST CENTER | OPINIONS | FORUMS | CAREERS | STOCK QUOTE
SUBJECT INDEXES | SUBSCRIBE | ABOUT US | SEARCH

Copyright © 2002. InfoWorld Media Group, Inc.
InfoWorld.com is a member of IDG.net

InfoWorld.com complies with the ASME guidelines with IDG extensions For New media.