Upgrading your DOS: why it's worth it.
The important point to remember, particularly for a newcomer to the PC, is this: when something seems to have gone wrong, it is just as likely that you did exactly what you were told to do (or what seemed perfectly sensible to do) as it is that you failed to follow instructions. 
When IBM introduced the IBM PC in 1981, it also provided PC-DOS as the operating system for the computer. DOS version 1.0 was flawed, clunky, and ill-mannered. In 1988, Microsoft and IBM debuted DOS version 4.0. It was criticized as flawed, clunky, and ill-mannered. This proved once again that the more things change, the more they stay the same.
In the intervening eight years, the computers controlled by DOS underwent enormous transformations. They went from 64 to 640 kilobytes of RAM. In 1981, you could use a 160-kilobyte floppy disk or a cassette for storage. Now disks come in two sizes with a choice of four storage capacities. Hard disk drives are nearly de rigueur, and 100 megabytes of disk storage does not seem outrageous.
Video output has gone through similar changes. Color monitors are common and for some software, required. A variety of video standards exist, from the original monochrome display adapter to state-of-the-art Video Graphics Array. Through all these changes DOS has had to keep up so that users could take advantage of the hardware advances. Most users now run MS/PC-DOS version 2.1 or higher. If you are one of those still using a DOS version 2.x, I'd like to point out some of the advantages of upgrading to version 3.3, the version most often sold with new computers.
I still run DOS 2.1 on my Epson Equity I at home. I just haven't found the crying need to upgrade; everything DOS 3.3 offers I can do with batch files or get along without. On the other hand, without version 3.2 at work, I'd be hard pressed to get some things done in any kind of reasonable manner. In the end whether you need to upgrade depends entirely on the kind of work you do with your PC. If you use your computer daily and do a fair amount of work with your files, you can probably benefit from an upgrade.
A Better Copy Command
One of the most useful commands introduced with version 3.2 is XCOPY.EXE.XCOPY functions much the same as its older cousin COPY, and if you never used it, youhd probably never miss it. But once you do use it a few times, the limitations of COPY become obvious. Because XCOPY is an external program, you will need to have it in a directory on your hard drive that is in yoru PATH. If you work with a two-floppy machine, you will need your DOS disk in the drive or XCOY stored on a RAM disk.
XCOPY works a little differently from COPY. When you type COPY *.* A: from a directory on your hard drive, DOS will duplicate all the files in your directory onto the floppy disk in A:. It does this by reading the first file into RAM and then copying it onto A:. Then it does the same thing for the second file. With a large number of files, this reading and writing process can take a long time.
XCOPY accomplishes the same task by reading as many files into RAM as it can fit. If you have j00 kilobytes of free space, that is how many bytes XCOPY will store in memory before writing to the floppy drive. By collapsing the read/write process in this way, the file transfer process is made much quicker.
Other improvements become obvious when you look at what you can do with the switches that are available for XCOPY. If you wanted to make a mirror back-up of a directory and its subdirectories using the COPY command, you would need to first create the directory and each subdirectory on the back-up disk, then enter COPY *.*. in each of directories you wish to back up. With XCOPY, you simply enter XCOPY *.* A:/S. The /S switch copies all files in all subdirectories and creates the appropriate subdirectory on the target disk, in this case the A: drive.
If you wanted to only back up all .TXT files or. WK1 files, you could enter XCOPY *.TEXT A: /S in the root directory and every file with a .TXT extension in every subdirectory would be copied. This simply is not possible using COPY.
XCOPY allows you to save files by date as well. By using the switch /D:<date>, you can back up files created or modified on or after <date>. An example is XCOPY *.WK1 /D:10-28-89.
The Archive Bit
If you use XCOPY to do back-ups regularly, two switches that may save some time are /A and /M. These work with the archive attributes or bits on each file. When used, either switch will copy only those files whose archive attribute is on. The difference is that /A does not change the attribute, whereas /M turns the bit off. There are three attributes (archive, hidden, and read-only) associated with every file. Each of these three can be on or off.
The archive bit is set by XCOPY, BACKUP, and RESTORE. If it is on, the file has not been backed up since it was created or last changed. Notice that COPY does not affect the archive bit, so if you have a safe copy but you did it with COPY, the archive attribute is still on.
If you are using DOS 3.2 or laterr, you can check or change the status of the archive attribute with the ATTRIB command. Typing ATTRIB C:\WP50\LETTERS\*.* will show the read-only and archive attributes for all the files in the LETTERS subdirectory of the WordPerfect directory. If you wish to turn off the archive attribute, type ATTRIB -A <filename>. Conversely, ATTRIB +A <filename> turns the attribute on.
The value of using the attribute when making back-ups is that you can save time by not copying those files which have not changed since your last back-up. If you enter XCOPY \WP50\LETTERS\*.* /M, every file in that subdirectory will be copied, as long as its archive attribute is on. After it has been copied, the attribute is switched off. It will stay off unit the file is modified with EDLIN, WordPerfect, or most other software that you may use.
XCOPY has a number of other switches. /E creates subdirectories on the target drive, even if they are empty on the source. /P prompts you for confirmation before copying each file. /V verifies that the file was copied correctly, and /W waits for you to press a key before beginning the copying process. Clearly, the flexibility and enhancements make XCOPY an attractive alternative to COPY, especially when doing daily back-up chores.
Virtual Disk Drives
Because DOS looks for COMMAND.COM every time it exits a program, you must have it accessible or you will get a message that reads something like "Bad or missing Command Interpreter." Making it available on a hard disk is relatively easy; simply make sure the directory in which it resides is in your PATH.
Such is not the case if you are still running a dual- or single-floppy system. In this case you must exit the program, take out the program disk, put in DOS, press Enter, take out DOS, and put in your next program disk. Unless you make a modification, DOS will always look to the drive from which you boot for COMMAND.COM.
To save you some time and disk swapping aggravation, you can place a few commands in your AUTOEXEC.BAT and CONFIG.SYS files. You will also need a RAM (or virtual) disk. RAM disks act like disk drives but use segments of RAM instead of hardware for storage. When you create a RAM disk, you can store programs and data there just as if it was a disk drive. The difference comes when you shut off you computer: the RAM drive disappears, along with any files stored there.
Creating a RAM disk is not difficult. To do it you will need a special program. If you use a generic DOS 3.2 or higher, you already have the program; it is called RAMDRIVE.SYS. PC-DOS users got a similar program with version 3.0; its name is VDISK.SYS. To use it, you will need to modify your CONFIG.SYS file by including a line something like the following: DEVICE=RAMDRIVE.SYS. This will create a 64-kilobyte virtual disk in memory. Your RAM disk can be larger or smaller by specifying the size in the DEVICE statement; to make the drive 128 kilobytes, enter DEVICE = RAMDRIVE.SYS 128.
If you using a version older than 3.2, you can still use a virtual drive. Programs to create one can be purchased from software vendors such as PC-SIG in Sunnyvale, California or Public Brand Software in Indianapolis. These will usually be shareware, although you may find one in the public domain. Another good source would be a local users' group. Unfortunately, the method shown below to locate COMMAND.COM on the RAM disk will not work with DOS versions older than 3.0.
Once the virtual drive DEVICE statement is in CONFIG.SYS, put the following statements in your AUTOEXEC.BAT file:
COPY COMMAND.COM C: SET COMSPEC=C:\COMMAND.COM
These statements assume that you do not have a hard disk. When you create the RAM drive, DOS assigns it the next available letter. Hence, if you have a hard disk and use a RAM disk, it will be drive D, and if you have one or two floppy drives, the next available letter is C.
After making these changes, DOS will look to the virtual drive for COMMAND.COM, and you will have one less disk to swap. If you wanted, you could file your virtual drive with commonly used external DOS commands, such as FORMAT, CHKDSK, and XCOPY, and always have them ready for use.
When I started writing these columns about DOS, I wanted to include a bibliography of helpful books at the end, but I find that I am at the end of the third column with no more space. In the next column, I will offer a highly personal, completely biased look at some books that I have found very useful as I navigate around my PC.
 The Boston Computer Society, Things the Manual Never Told You: IBM PC Edition. Addison-Wesley, 1985, p. 3.
Randy Dykhuis is with the Local Systems Division of OCLC.
|Printer friendly Cite/link Email Feedback|
|Title Annotation:||computers in libraries|
|Publication:||Computers in Libraries|
|Date:||Nov 1, 1989|
|Previous Article:||Lightning strikes twice.|
|Next Article:||New optoelectronic chips enable high-speed optical links.|