💾 Archived View for spam.works › mirrors › textfiles › computers › mrdos4.txt captured on 2023-12-28 at 17:19:40.

View Raw

More Information

⬅️ Previous capture (2023-06-14)

-=-=-=-=-=-=-

DOS Level 2:

We have seen that DOS's mission is one of file management.  Every software
has a purpose and DOS's is for housekeeping of files.  However, we also saw
that DOS is unique because we can't run the computer without it.  We must
"boot" the system with the internal DOS files each time we start the computer.
Finally, most people don't realize that DOS is also the Swedish word for
toilet.  Which DOS is more important in your life?   Too obvious to comment.

WHEN A COMPUTER IS POWERED-UP
-----------------------------
What actually happens when the computer is started?  First, a factory preset
set of instructions residing in ROM are activated.  ROM stands for Read Only
Memory.  This set of chips can send instructions TO RAM, but it cannot receive
them - thus cannot be altered.  The unalterable set of ROM instructions
performs systems checks to make sure all critical hardware components are
hooked up properly and in the case of RAM - operating properly.

Once the hardware check is performed, ROM instructs RAM to search the A drive
for internal DOS files.  If no disk is present in drive A, then ROM directs
RAM to check the Root directory of the hard drive for the necessary files
(more on Root directories in Hard Disk DOS lessons).  If the files are found,
they are automatically loaded into to RAM (booted).

There are 3 files which comprise internal DOS:  IBMDOS.SYS, IBMBIO.SYS and
COMMAND.COM.  The first 2 files are hidden files.  They cannot be seen in a
DIR command, nor can they be copied or deleted with conventional DOS commands.
These files are responsible for the linking of the hardware components.  The
final file, COMMAND.COM CAN be seen, copied or deleted, and contains the
frequently used internal DOS file management commands.  Again, the system will
not boot without these 3 files.

It is from the DOS prompt:       A>
that we can go forward with
the task of file management.

We have already seen a handful of the most useful DOS file management
commands.  Lets expand their abilities with the use of file WILDCARDS.

WILDCARDS
---------
Wildcards allow the power of a DOS command to expand.  For example, imagine
that you need to copy 12 files from a disk containing 100.  The 10 files all
begin with the word SALES.   Sales.Jan, Sales.Feb, Sales.Mar ...

We could copy each file individually:  A>Copy Sales.Jan B:
                                       A>Copy Sales.Feb B:
                                       ......

Or, we could do it in one command with the use of a wildcard:

                                       A>Copy Sales.* B:

The asterisk (*) represents a wildcard.  It is often referred to as a star.
The above command would read "Copy Sales dot star space B full colon".
                                                                                





Any DOS command that references a filename can make use of wildcards to
expand the command.  When a Copy command is issued, DOS is instructed which
single file to copy.  However, when we use a wildcard, DOS is instructed to
use any files that meet the criteria.  The asterisk expands the criteria for
qualifying files.

A>Copy Sales.* B:   says "copy any file from drive A to drive B that contains
                          SALES as the filename, regardless of the extension"

What if we wanted to include the files:   SALES1.DOC, SALES10.DOC and
                                          SALESMAN.SUM

SALES.* is not broad enough criteria to include these files.  Rather, we would
state it:
             A>Copy SALES*.* B:

Now the criteria is to copy ANY file as long as the first 5 characters are S A
L E S regardless of what other characters come after these first 5 in the
filename or what exists in the extension.

The asterisk is the broadest and most often used wildcard.  Some other
examples of its use:

             A>Copy *.DOC B:    (all files with the extension DOC)
             A>Del S*.*         (any file that begins with the letter S)
             A>Del B:*.*        (ALL files from the B drive - be careful!)
             A>Dir B:*.COM      (A list of all files with an extension of COM
                                 on the B drive)

Anywhere a file specification can be given in DOS, the specification can be
broadened with a wildcard.  The asterisk is very useful.

Another wildcard is the question mark (?).  It too broadens the criteria for a
command,  however,  it is "location specific".  For example:

              A>Copy S?.DOC B:

Any file that has S as the first character followed by a single character
in the second position or not, but NO more characters in the filename plus an
extension of DOC.

Therefore, these files would make it:   S.DOC    SA.DOC SI.DOC    S5.DOC.
          And, these files would not:  SALES.DOC   SAT.DOC   S5.EXE

Wildcards can be used together:

              A>Copy S?L*.* B:

This will use the following:     SALES.COM    SAL     S5L.DOC    SL.EXE
                    But not:    SAM.DOC    BUDGET.SL

                                                                                





The wildcard characters,  *  and ?  are used with DOS commands such as DIR,
COPY and DEL to broaden their application.  An asterisk, or "star" allows up
to 8 characters at any position in a file name.  A question mark does the
same, but for only 1 character position.