Section 1A - DOS Commands and Related Info

    Return to PC Info Sub-Index Page        Return to Home Page

1.   DOS Versions Compared 
2.   Manually creating a Bootable Floppy
3.   Symbols used in Batch Files
4.   Floppies Formatting Switches
5.   Creating Fun PROMPT Statements
6.   Using the TREE Command 
7.   Using the MODE Command for Serial Printers / Reset Screen
8.   DOS Copy Problem
9.   Ways to Speed Up your PC 
10.   DOS FASTOPEN Warning 
11.   DOS Printer Control 
12.   Easy Backups 
13.   DOS Startup Files (10 pages)
14.   The POST

Subject: DOS Versions





Debuted with

Memory used by System Files in Bytes MS





New Drives and Formats



Other Features

1.0 PC-1 10,240   Full-height SS Floppy Original IBM PC Operating Sys
1.1 PC-2 12,400  1.25 Full-height DS 360K Floppy Files labeled with time of day.  PC-DOS has Diskcopy, Diskcomp
2.0 XT 24,688 2.0 10Mb Hard Drive, hierarchical file system, format 180k SS, 360 DS File Handles, print spooling, device drivers, piping, re-direction, labels on disks, improved BATch cmds
      2.1   Some International Support, Kanji
2.1 PCjr 24,688   Half-height Floppy Drvs ROM Carts, other PCjr support
      2.11   Combined 2.01 and 2.1
3.0 AT (286 CPU) 38,928 3.05 20Mb Hard Drive, 2k Clusters, 1.2 Floppy Drive Ext Memory RAM disk, CMOS clock, path commands, PC-DOS gets International Support
3.1   38,960 3.1   PC LAN Support
3.2 PC   Convert 46,000 able 3.2 3.5 inch 720 Floppy Drive Tokin Ring LAN Support, Xcopy, ability to set environment size
3.3 PS/2 -30 50, & 80  54,992 3.3 3.5 inch 1.44 Floppy Drive, multiple 32 Meg Hard Drive Partitions @ prefix suppresses display of batch command, IBM disk cache
    56,224 3.31 Larger than 32 Meg Hard Drive Partitions Compaq, Zenith
      4.0 Sold in Europe only Rudimentary Network Support
4.0   65,424   2 Gig Hard Drive Partitions EMS 4.0 support, DOS Shell
4.01   68,608 4.01   Bugs fixed
5.0   70,824 5.0 4Mb RAM Drives, HIDOS, UMB More RAM Available for applications, On-line help, improved editor
6.1   131,533 6.0 PC-DOS with Stacker MS-DOS w/Doublespac DOSKEY works!  Memmaker auto-optimizer
      6.2 Doublespace improved HIMEM. SCANDISK
      6.21 Doublespace removed  
      6.22 Drivespace added  
7.0     7.0 Stripped down version of 6.22 for Windows 95  

Return to Top

Subject: Manually Making a Bootable Floppy....

Why would you want to manually make a bootable floppy? This can
be very useful if the only copy of the system files you have are
on a CD or a backup tape. If you work with computers long
enough, someday you'll need to do this...

If you copy IO.SYS, MSDOS.SYS, and COMMAND.COM to a 
floppy in that order, they physically end up in exactly the same place
(sector location numbers) as a floppy that you perform a "SYS"
on. The problem is the floppy you copied the files to won't

What's the difference? The secret lies in where the Volume Label
resides. On the floppy you copied the files to, it sits before
all the files. On the SYStem floppy the Volume Label sits
between the second and third file, or between MSDOS.SYS and
COMMAND.COM, forcing the system to read the files as it looks for the label.

Here are the steps to manually create a bootable floppy...

1. On a formatted floppy clear the Volume Label
        (label a:, hit return, Y - yes delete label)
2. Copy IO.SYS to the floppy
3. Copy MSDOS.SYS to the floppy
4. Set the Volume Label to something, ie.. BOOTABLE
5. Copy COMMAND.COM to the floppy
6. Test the floppy to see if it boots.

Actually, step 1 is optional if you have freshly formatted floppy
and you know it doesn't have a Volume Label (you hit return
when it asked for a label name).


Making your own. If you have a good DOS utility like XtreeGold,
making this floppy is a snap. If not, you will have to deal with
copying "system, read-only, and hidden" attributes on the IO.SYS
and MSDOS.SYS files. For this reason you will need to find a
utility that can copy these system files (you can't change the
attributes of a file on a CD-ROM). An example is a small utility
call HCOPY.EXE, written to copy these hidden files. Assuming you
have such a utility (should be placed in the root directory,
C:\), follow these steps:

1. Start with a freshly formatted floppy in the A: Drive.
    NOTE: for this to work with Win95/98, the floppy must
    be formatted by Win95/98!
2. From the C:\> prompt ENTer these commands:
    hcopy io.sys a:
    hcopy msdos.sys a:
    label a:bootable
    copy a: (if COMMAND.COM has been made Read-
    Only, use "hcopy a:")
3. Re-boot the computer and test your new bootable floppy!


The HCOPE.EXE utility is freeware authored by Brian Garone. By
just ENTering "HCOPY" you will get instructions.  Brian is available to make custom utilities and other programming requirements.  E-mail Brian at "" for information.

Download   HCOPY.EX_   REName to HCOPY.EXE (can't download exe files)

R. Boettjer 2-2000                Return to Top

Subject: Batch File Symbol Summary

At sign (@) Stops the remainder of the line from being 

Period (.) Used with ECHO, displays a blank line.

Percent sign (%) Precedes a number from zero to 9; indicates
a replaceable parameter, a value you set when executing a batch file.

Double equal sign (= =) Compares two values in an IF statement.

Colon (:) Precedes a line label.

Double colon (::) Precedes a remark; replaces REM.

Equal sign (=) Sets the variable on the right side of a 
command to the value of the string or variable on the left side.

Two percent signs (%variable%) Indicates an environment variable, usually 
set within the batch file.

Double greater-than sign (>>) Adds data to a file; if the file doesn't 
exist, DOS creates it.

Single greater-than sign (>) Reroutes data to a device or new file.

Single less-than sign (<) Reroutes data from a file to a command.

Double percent sign (%%) Precedes a variable in a FOR. . . IN. . .
DO statement.

Pipe symbol ( I ) Sends the output of one program as input 
for the next program.

Slash ( / ) None... Used within a FOR..IN. . .DO
statement, breaks strings in two.

Return to Top

Subject: Format Switches

UPDATED: 2-26-91

Use these switches when formatting diskettes:

/s - on any floppy to load the system (make a bootable disk)

/4 - use with a high density (1.2MB) drive when formatting a
360K floppy (5.25 inch diskettes)

/t:80 /n:9 - use with a high density (1.44MB) drive when
formatting a 720K floppy (3.5 inch diskettes)

Example: to format a 360 floppy with the system files on a high density

C:\>Format /4 /s

How to tell the difference between high and low density diskettes:

The 3.5 inch floppies are easy. The High Density have an "HD" stamped
on them, all others are low density. Both have a small window in
the upper right hand corner for 'write-protect'. Covered means you
can write to them. High Density (1.44 Mb) also have a small window
in the upper left hand corner.

On the 5.25 inch floppies the key is looking at the center hole.
If there is a 1/8 inch reinforcing ring around the hole, it is
a low density. If there is no ring, it is a high density. (All
except Zenith Floppies. Their low density looks just like the
high density, but the label shows it's a low density).

Return to Top

Subject:  Custom DOS Prompts

Would you like a time and date in the upper right corner of the screen
that doesn't take up any RAM, and doesn't write on the screen to annoy
you while you're in a program? Then this is for you.

This will give you a blue screen, white lettering, yellow clock, and
a lime prompt.

ANSI.SYS must be a device in your CONFIG.SYS file to allow screen colors.
You might also have to increase you environment size. Do this in CONFIG.SYS
with this line: SHELL=C:\COMMAND.COM /E:512 /P /F

These prompts can also be loaded in your AUTOEXEC.BAT file.

The "@" sign only works with 3.3 or higher DOS (hides 'echo off').

Make the following BAT files:

PROMPT=$e[s$e[1;59H$e[1;33;44m $t$h$h$h$h$h$h $d$e[32;1m$e[u$p$g$e[44;37m


PROMPT =$e[32;1m$p$g$e[44;37m


prompt=$e[6C$e[1;32m/$b$_ \'o.O'$_ $q(___)$q$_ $e[1;5;31mU$e
(no carraige return) [0;35;1m$_ACK! YUKTANG! $e[1;36m$p$e[33m$g$e[37m

PROMPT=$e[1;33m\/\/\/$_$e[6C$_ $e[;5;36m0 0$e[;1;33m)$_C$e[6C_)
(no carriage returns) $_ $e[1;31m,___$e[1;33
m Command me, dude!$_ / $e[m 

Return to Top

Subject: TREE Batch File

When you execute the "TREE" command, it seems to have a lot of blank
lines (try it). By making a couple of 1 line BAT files you can have
a much better report.

Use the "copy cons <file.ext>" command to make the following two bat


Or have sent to the printer with this;


The "%1:" sets it up so you can do a different drive. Let's say you 
have the BAT files n the C: Drive, and you want to run this on your
D: Drive. ENTer MYTREE D

These will give you a listing of all your Directories. If you want
a listing of all the files in each Directory. The command is:


Return to Top

Subject: Using DOS MODE Command

********** CUSTOM PORT CONFIGURING *********

It takes two MODE commands to configure and redirect the default DOS 
printer port. The first one configures the port: 

MODE COM2:9600,N,8,1,P 

This tells the port <speed>,<parity>,<bits>,<stop>,P (printer) 

The next one tells DOS to redirect the default printer to the 
newly configured serial port: 


To set COM1 to 2400 baud, 7 bits, even parity, type these commands: 

MODE COM1:2400,E,7,1,P 

Note: If you leave off the 'P' from the first statement, then you can
get out of a print if the printer is not working. A nice option
if you're working on a printing problem!

********** CLEARING YOUR SCREEN *********

MODE can also be used to reset your Monitor Screen to the original start
up mode. Sometimes certian programs can add borders that don't clear.
Just issue this command anytime: MODE CO80 (C-OH-8-ZERO)

Return to Top

Subject: DOS 6.2 Copy Bug

When using COPY or XCOPY with a disk that is almost full and you are over-
writing an older copy of the same file, and the new file is too large to fit
on the disk, DOS 6.2 will delete the old file first and then tell you that
there is not enough room on the disk for the new file. The old file is not

Testing proved this was also the case on hard drives.
Return to Top

Subject: Ways to speed up your PC (We have the NEED for SPEED!)

This document will explain a few ways you can make your PC run a little
faster by taking control of how it handles files. You can always install
a faster Hard Drive, or upgrade to a faster CPU, or you can give your PC
a little help in doing it's job. So if you have the need for a little
more speed in your life, and you don't want to spend your last three 
paychecks, then this might be for you.

I will not be going into a great deal of step by step detail here.
If you want to try one of these, and aren't confortable with making
changes, get someone to help you.

Before you attempt to make any of these changes, be sure to have your PC
completely BACKED-UP! Preferably, by sub-directory (do not use the DOS
BACKUP/RESTORE), this will let selectively backup and load files. Another
advantage of not using the DOS Backup, is that if you change DOS Versions
none of your backup disks will work.

We will be looking at the following areas:

Disc Optimizing
Virtual Drive
Substitute Drives
Loading TSR's
Hard Drive Partitianing for speed
Disc caching and FASTOPEN

If used, a few of these topics, will require you to use some memory. If you
run large spreadsheets, or applications, this might lead to "RAM Cram", or
running out of memory. So as we discuss each of these areas, I will try to
include options. This will include perhaps buying some extra memory. You
might find this a low cost alternative to expensive upgrades.


There are a number of file defraggers or disk optimizers such as the ones
listed here:

Optune, Norton Speed Disk, Disk Optimizer, PC-Kwik Power Disk,
Vopt, PC Tools, Compress FastTrax, MACE Unfrag

What is an Optimizer/Defragger, and how do they work ?

The older your Hard Drive, the slower it seems to run. This has nothing to
do with mechanical wear or age, this has to do with how the files are laid
out on your hard drive. As files are created, modified, and deleted on the
Hard Drive, they get moved around. When Dos writes a file to the Hard Drive,
it doesn't work the way we do. Unlike us who would file an entire document
together in a single folder, DOS sometimes breaks the files up into many
little pieces, and then stores these pieces in many different places. So
when you call a program, and that program has "fragmented" files, it takes
much longer for the heads on the Hard Drive to find all the pieces and put
them into memory.

One way to speed up your access time is to defrag or optimize your files.
These Utilities go get all the little pieces, and put them together in
one place and makes them "contiguous" files. Then they load much faster.

What can you do if you don't have one of these nifty programs? You can do
it manually. It takes a little longer, but is well worth the effort. Just
backup your hard drive, by sub-directory, re-format the drive, and then
reload the software. This probably sounds a little scary, but if you're
used to copying files it shouldn't take too long. When you reload, you
should make all your directories first and alphabetically. This way when
you do the DIR command, they will list alphabetically. You should load the
directories that will have the least changes in the files first, such as
your DOS files. If you run a program such as AutoCAD or dBASE and keep
your work files in separate subdirectories, load these right after
DOS. This will help keep the Hard Drive more organized and running
faster for a longer period of time.


DOS needs three files to "Boot Up". Two hidden files, usually IBMBIO.COM,
and IBMDOS.COM, and a regular file COMMAND.COM. COMMAND.COM is only needed
when you are in the DOS Command Mode, doing a directory, copying, or running
a BATch file. It isn't needed when you're in an application, so DOS will
load application software right over COMMAND.COM. Then when you exit your
program, it will reload COMMAND.COM. This takes time! On way around this
is to load it into a RAM, or Virtual Drive, and have it available all the 
time. See the next section on how to create a Virtual Drive.

Once you have a RAM Drive all you have to do is copy it there and then tell
DOS where it is. If your RAM Drive is "E:", add these two lines to your


This will allow DOS to find COMMAND.COM with lightning speed. Please note,
on some systems this might cause a problem formatting floppies with the
SYSTEM (making a Bootable disk).


To make a Virtual or RAM Drive all you have to do is add a line to your
CONFIG.SYS file. Depending on which version of DOS you are using, it
might be RAMDRIVE.SYS, or VDISK.SYS. Add this line to CONFIG.SYS;

DEVICE = C:\DOS\RAMDRIVE.SYS 1024 512 256 /E
                                                             ~~~  ~~~ ~~~ ~~
                                                                1       2     3     4

Number 1 is the size of the of the RAM Drive. Number 2 is the size of the
sectors. Three is the numbers of files allowed on the disk (FAT table size).
And number 4 tells it what kind of memory to use: E=Extended, A=Expanded, no
letter will use conventional memory.


TSR's - If you have an older PC, and want to set up a small RAM drive in
conventional memory for COMMAND.COM, and you load a few TSR's then this
hint is for you... Load your TSR's before your Path statement. Every TSR
includes a copy of the path statement, if you have a long path, it eats up


Every Drive, Floppy and Hard, sets the first area aside for the FAT Table.
FAT or File Allocation Table is where DOS goes to look to see where the file 
is on the Hard Drive. Lets say you have a 100 Megabit Hard Drive. If you
set it up so all 100 Meg is Drive C:, then you can see that the heads of 
the hard drive may have to move the entire width of the platter to read the
FAT and then go retrieve the data. However, if you break it into three parts
of 33 Megs each, then it becomes 3 times faster just because the maximum
head travel will only be 1/3 of the platter.

This will become very apparent if you do any database work, or have lots
of fragmented files. People who write a lot of letters or small documents
fall into this category.


These two items will speed how fast the CPU can get information from the
Hard Drive. There are big pluses and minus's to using either. Disc Caching
Software is available from many non-DOS manufacturers. It sets itself up
in extended RAM and writes a copy of whatever comes off the Hard Drive. If
you recall something again, it is pulled out of the Cache - with the same
speed as a RAM drive. The drawback here is that to be effective you need
a meg or two of extended memory you can set aside for this use.

FASTOPEN was DOS's answer to Caching. It became available in Version 4
of DOS. It captures the FAT table from the Hard Drive. When the CPU
goes looking for something, it accesses the FAT in one cycle and the Hard
Drive uses it's time just reading the data. Cuts access in half. Beware,
FASTOPEN can do major damage to your Hard Drive. See the next item for
more info.
Return to Top

Subject: DOS FastOpen Warning


If you use any file defraggers or disk optimizers such as the ones listed
below, then this warning is for you!

Optune, Norton Speed Disk, Disk Optimizer, PC-Kwik Power Disk,
Vopt, PC Tools, Compress FastTrax, and MACE Unfrag

FASTOPEN is a DOS program avaialble in Version 3.3 and later. FASTOPEN helps
DOS remember where it's been.

FASTOPEN is usually loaded via the AUTOEXEC.BAT file. Once loaded it remembers
calls to the Hard Drive(s). Normally when you load or call a program from
the Hard Drive, such as WordPerfect or Lotus, the Hard Drive goes to it's
FAT (File Allocation Table) to find out where on the Hard Drive the files for
that program are located. With FASTOPEN, this information is stored to
memory. Then if you load the same program again, DOS knows where the program
files are, so it doesn't have to go read the FAT. This reduces the Hard
Drive access time. Hence the name "FastOpen".

Depending on how you use your PC, FASTOPEN can make your programs load much
faster. So what's the problem? None, as long as you don't move files
around on your Hard Drive.

Now we need to look at how Optimizers/Defraggers work.....

The older your Hard Drive, the slower it seems to run. This has nothing to
do with mechanical wear or age, this has to do with how the files are laid
out on your hard drive. As files are created, modified, and deleted on the
Hard Drive, they get moved around. When Dos writes a file to the Hard Drive,
it doesn't work the way we do. Unlike us who would file an entire document
together in a single folder, DOS sometimes breaks the files up into many
little pieces, and then stores these pieces in many different places. So
when you call a program, and that program has "fragmented" files, it takes
much longer for the heads on the Hard Drive to find all the pieces and put
them into memory.

One way to speed up your access time is to defrag or optimize your files.
These Utilities go get all the little pieces, and put them together in
one place and makes them "contiguous" files. Then they load much faster.

But here's the glitch. When these utilities move files, they update the
FAT but not the FASTOPEN memory. This makes the information that DOS
has for the location of your files incorrect. What does this mean?

Well, for one thing, when you call a program DOS won't be able to find
the files and your PC will probably lock up. But much worse is that
the FASTOPEN memory thinks it knows where open areas are, and when you
save a file, it tells DOS to write to these open areas, except they are
probably no longer open, so DOS writes right over your other files and,
presto, you have damaged files on your Hard Drive.

Depending on the amount of damage, you might have to just reload your
programs, or in some cases start from scratch. This includes having to
send the hard drive out to be low level formatted or prepped. Not only can
you lose all your data, you can lose use of your computer for some period
of time.

If you insist on using FASTOPEN, and an Optimizer, then you should run the
Optimizer from a BATch file. The BATch file should end by rebooting, and
clearing the FASTOPEN memory. Little programs for rebooting such as
COLDBOOT and WARMBOOT can be found in the utility programs of PC DOS Power
Tools, or found on numerous Bulletin Boards.
Return to Top

Subject: DOS Printer Control

Control your Printer from DOS!

Standard functions: Control character:
------------------- ------------------

Bell G
Line Feed J
Form Feed L
Carriage return M

1. Make a text file to cause a Form Feed (or any other function).

C:\>Copy con FF.TXT (Copy the following into a text file called FF.TXT)
/ (press escape and return)
^L (Press control and L, then return)
^Z (Press control and Z, then return - this ends
the file)

This file, "FF.TXT" now contains; "escape code control L"

2. To make it work, make a BAT file that will send it to the printer as
as a text string.

C:\>Copy con FF.BAT (Copy the following into a batch file called FF).
@ECHO OFF (Prevents file from showing on screen)
Type FF.TXT>PRN (Type this string and return)
^Z (Press control and Z, then return - this ends
the file)

Now you can just type "FF" or "ff" from anywhere and cause your printer
to form feed.
Return to Top


The end of the year brings a lot of calls for HELP on how to undelete
and unsave files. I say unsave, as these are files that people used for
FY90, that they pulled up, modified for FY91, and then saved as FY90.

In effect, they wiped out their 1990 data. These are two different
problems, but they are representative of a common problem. The first, a
deleted file can be retrieved, if you have not saved or written anything else
to that drive. The second, unsaving a file, is impossible. If it was ASCII
text, then there will be a BAK file. But most of our requests are for HELP
with Lotus and Word Perfect files. Both of these problems can be resolved
with daily backups. (I can hear you all cringing right now!)

But it's not as bad as it seems. There are some simple, and cheap ways
to get DOS to do this for you. First, if you want to take the format of a
spreadsheet or document and use it again, do it the safe way. Copy the
original. It's easy. Go to the sub-directory, and...

C:\123> COPY FY90.WK1 FY91.WK1 or COPY <old file> <to new name>

This way you have the format you want, and you don't take the risk of
over-writing your valuable data.

BACKUPS: There are a number of high powered Back Up Programs on the
market that do a very nice job. These programs cost money, and I've yet to
use one that I thought was user friendly. Besides, you don't need to back up
your program files on a daily basis, just your working files. My favorite
program is a small 1392 bit utility called BAC.COM. It is one of many
utilities that comes with a great book called PC MAGAZINE DOS POWER TOOLS
(Ver 1 or 2). This utility looks at my work files, and compares them against
my floppy and only copies new or updated files. My daily backups take me
less than three minutes, and sometimes involve as many as twenty files.

The first part requires that you keep your work files in a separate sub-
directory. In Lotus, make it C:\123\SS (for spread sheets), then tell it to
look there for your files /,Worksheet, Global, Default, Directory. For Word
Perfect, make a sub-directory called DOC. To start Word Perfect so it looks
for your files in this sub-directory, make a BAT file like this to start Word


OK, it makes sense to organize your files, and you kind of like the idea
of easy backups, but who's going to spend $30 on a great book? Well, you can
do the same thing with DOS; it's just not as clean. Make a BAT file like

IF "%1" == "" GOTO Notice
xcopy %1 a: /m /v
ECHO Proper usage is BU Physical-Drive, Sub-Directory(s) ..... 
"BU C:\123\SS"
ECHO Please try again !

This will even list on screen the files it backs up. You may notice
this uses DOS XCOPY which is only available in DOS Version 2.3 and later. If
you have an older version of DOS, you still have the old standby, COPY.

If you only work on a few files everyday, then this will still work for
you. Lets say you work only on Lotus files everyday. Then do this....

C:> COPY C:\123\SS\*.WK1 A:

This will copy all your spread sheet files from your sub-directory to
the floppy in A: Drive. If you work on the same files in several different
programs, make a BAT file to copy those particular files....

COPY C:\123\SS\FY90.WK1 A:

Again this will quickly copy all your work files.

The important issue here is that we should all do daily backups. Always
remember that there are only two kinds of files: those that have been lost,
and those that will be lost. It is very sad to see co-workers cry cause they
have just lost a years worth of data when their hard drive has crashed.

If you still insist on not doing backups, you should at least invest in
Norton Utilities, and MACE Gold. These programs are your best bet at
recovering lost data. You might need them sooner than you think!

Return to Top

Subject: The Post

When you turn on your computer, several events occur automatically:

The CPU "wakes up" and sends a message to activate the BIOS.

The BIOS then runs a series of tests, called the POST for Power On Self Test, to make sure the system devices are working correctly. In general, the BIOS:

Initializes system hardware and chipset registers, Initializes power management Tests RAM (Random Access Memory), Enables the keyboard Tests serial and parallel ports, Initializes floppy disk drives and hard disk drive controllers, Displays system summary information

During POST, the BIOS compares the system configuration data obtained from POST with the system information stored on a CMOS - Complementary Metal-Oxide Semiconductor - memory chip located on the motherboard. (This CMOS chip, which is updated whenever new system components are added, contains the latest information about system components.)

After the POST tasks are completed, the BIOS looks for the boot program responsible for loading the operating system. Usually, the BIOS looks on the floppy disk drive A: followed by drive C:.

After being loaded into memory, the boot program then loads the system configuration information in the CONFIG.SYS file, AUTOEXEC. BAT file and if the operating system is Windows, then the device drivers contained in the registry.

Finally, the operating system is loaded, and, if this is a Windows environment, the programs in the Start Up folder are executed.

    Return to Top

    Return to PC Info Sub-Index Page        Return to Home Page