Skip to main content

Posts

Showing posts from July, 2020

Path

The PATH command is used to provide access to files located in other directories or on other disks. The PATH command is usually entered as a line in an AUTOEXEC.BAT (or batch) file, which most often contains one or more DOS commands. The AUTOEXEC.BAT file is automatically executed upon system turn-on to run one or more desired programs without the need for user intervention. Other batch  files are executed upon command. When an AUTOEXEC.CAT file is used, each command contained in the file executes as it is encountered. The creation and use of batch files is described in Section 8. To illustrate the PATH command, assume you have a program named GATOR.COM that is located in a sub directory. You are not sure if it is cn disk C or disk A, so you want to search both disks and execute the command when found. To complicate matters, you are not sure if the program is in the SWAMP sub directory or the MUD sub directory. Here is where the PATH command comes to your rescue. To set up a search...

Making, Changing, and Removing Directories

You used the DIR (directory) command in Section 3 to display a list of filenames on the screen. You can create and name multiple disk directories on a disk to allow for the subdivision of your files. This feature lets you group common files into separate directories. This is similar to subdividing information into file cabinet drawers and file folders. This is particularly convenient when you use a fixed disk containing hundreds or even thousands of files. Instead of listing all files in one directory, you can list files in smaller, more manageable sub directories. Lock at the following directory commands. Command                                      Purpose                   MKDIR or MD                                Make a new directory        ...

Filenames (2)

Wild Cards and Literals: Now that you understand filename rules, you should understand the use of two convenient tools: wild cards and literals. Wild Cards: In the card game poker, a wild card may be any card that a player chooses. Forexample, if deuces are "wild," a player can make three kings by using two kings and a deuce. In DOS, an asterisk (*) character is "wild." The asterisk stands for one or more characters in a filename or extention, beginning with the asterisk position. If only an asterisk is used, it represents the entire filename. A few examples are in order. If you wish to list a directory of all files having the extension COM, you can type the command DIR *.COM and press Enter. Every filename with the extension COM is listed. If you want to list a directory of every file beginning with the letter W, you can use the command DIR W *.*. Every filename beginning with W and having any extension is listed. Therefore, the wild card lets you select a set ...

Filenames

It is important to understand DOS file naming conventions and their use. Here, filenames and some special filename "tools" called wild cards and literals are described. What is a File name?   Every program and data file is given a name to differentiate it from other programs and data files. A program is one or more computer instructions collected into a file. A data file is normally a collection of characters (or data) that make up a document, like a letter, or a database, like a collection of accounting transactions or customer records. Descriptive filenames are normally used. For example, if you create and save a letter to Mom, you might give it the filename MOM.LTR. A letter to Dad could be called DAD.LTR. A word processing program file might have the filename WP.COM. Examine these filenames a little closer. First, notice that each filename is meaningful. This is important if you want to know what is in a file by looking at its name. Obscure filenames are of little u...

Section 4 Introduction

Introduction Section 3 introduced you to the Dir command. You used it to display a list of filenames. This section provides more information about filenames and disk directories, sometimes called file paths. Filenames are given to text, data, and program files that reside on a disk. Directory (or path) names are also given to disk directories, which are convenient subdivisions in which categories or families of files may te collected and maintained. Several commands are available to create, list, or delete filenames and directory names. These include: MKDIR (or MD)            Make (or create a new sub directory. CHDIR (or CD)            Change to (or log) a named directory. RMDIR (or RD)            Remove a named directory. PATH                            Provide automatic access to program and batch files located within one or m...

DIR, MEM, CHKDSK ACTIVITY

DIR, MEM, CHKDSK ACTIVITY In this activity you experience the use of the DIR, MEM, and CHKDSK commands. Begin at the C> (or A>) DOS prompt.    1. Type DIR/P and press Enter to display a list of filenames. Recall that the /P parameter pauses long lists of filenames to prevent them from scrolling out of view.   2. Type CHKDSK and press Enter to display free disk space and system memory information.   3. If you have DOS 4.01 or later, type MEM and press Enter to display your computer's memory configuration

MEM

MEM The MEM command was introduced in DOS version 4.01 and memory information. The MEM command is entered alone or with a modified slightly in MS-DOS 5.00. MEM is used to display system memory information. The MEM command is entered alone or with a parameter. MEM-Displays to all system memory values, including expanded and extended memory values. MEM PROGRAM--Displays programs presently loaded in memory with used and unused memory. You may use /P if you are using DOS 5.00 MEM/DEBUG--Dispiays a list of programs, device drivers, install drivers, and used unused memory. You may use / if you are using DOS 5.00. MEM CLASSIFY (or MEM /C)-Displays programs and cor-responding memory usage. The largest available memory block is also displayed. You may use /C if you are using DOS 5.00. Typing MEM and pressing Enter displays information similar to the following (typical of DOS 5.00): C:\>MEM                  ...

CHKDSK (2)

CHKDSK The "hidden files" are your DOS system files. These show up on all DOS disks. "User files" are those that are listed when the DIR command is used. The amount of available disk space is perhaps the most important line in the report. This tells you if you have enough space on a disk for continued work. If the amount of space is limited, it may be time to use another disk, delete obsolete files to recover disk space, or copy inactive files to another disk and then delete them from the current one. Notice that the CHKDSK command also gives you a report on your computer's memory. The total amount of memory and the amount of free memory is displayed. In the first sample report, the system is using 41,520 bytes (or characters) of memory space. This is often called system overhead. The second example shows a substantial amount of memory in use by DOS and other memory-resident programs. Here, it is probably advisable to deactivate memory-resident programs if you m...

CHKDSK

CHKDSK The CHKDSK command checks the status of a selected disk. It is an external DOS command, and it displays several information. These include: The total disk space The total disk space occupied and the number of files The total disk space either lost or considered unusable by the system The amount of disk space available for use The total amount of memory available in your computer The amount of memory occupied by the operating system and memory-resident programs The amount of memory available for use DOS Version 4.01 also displays the volume serial number, if one exists, and disk and memory allocation information. The general form of the CHKDSK command is:                                                        CHKDSK D: where D: is the drive letter holding the disk to be checked. For example, the command CHKDSK B: performs a d...

DIR (2)

DOS Version 5.00: DOS 5.00 introduced a number of new DIR parameters which are summarized in the following list. In addition to the new parameters, DOS 5.00 also displays the number of bytes contained in the files in the listed directory. Prior DOS versions only displayed the number of files in the listed directory. DIR/A:attribute-  Displays files having certain file attributes, where attribute is one of the following: h     hidden files -h    nonhidden files s      system files -s     nonsystem files d     directory names -d    files only (no directory names) a     files that need archiving (backup) -a    files that have been archived r     read-only files -r    files that are not read-only DIR /A:r-h-  Displays read-only files that are not hidden. DIR /B- Displays a bare filename listing without size, date, and time information...

DIR

DIR The DIR command is used to display filenames on your screen. In addition to names, the file size and creation date and time is also displayed. Several forms of the DIR command are available for you to use. A comprehensive list of DIR command forms follows. DIR-Lists a directory of the disk located in the active (or logged) disk drive (disk A if the A> prompt is displayed, B if the B> prompt is displayed, and so on). DIR D:-Lists a directory of the specified disk D:. DIR/P or DIR D:/P- Pauses the directory listing when the screen is full. press any key to see the next screen load of filenames. Typing DIR |MORE achieves a similar result. DIR/W or DIR D:/W- Display a wide directory; omits file size , date, and time information. DIR filename.ext - Displays the specified filename; used to verify the presence of a file on the logged or specified disk. DIR filename.* or DIR filename.???-Displays a directory of all files having the same filename with different extensions....

Format, Vol, and Label Command Activity

FORMAT, VOL, AND LABEL COMMAND ACTIVITY In this activity, place a blank disk in drive A (or drive B if you are using a floppy disk system). In this activity and others, use B in place of A if you are using a two-drive floppy system. Your DOS disk should be located in drive A on a floppy system.   1. Type FORMAT A:/S and press Enter. Notice the following display. Insert new diskette for drive A:   and press ENTER when ready...   2. Insert the disk to be formatted and press Enter to start the disk formatting process; notice a "Formatting..." display. It may include the Head and Cylinder location if you have DOS version 3.10 or later.   3. Wait until the following message is displayed.   Format complete   System transferred  xxxxxx bytes total disk space      xxxxx  byte used by system    xxxxxx bytes available on disk Format another (Y/N)?   4. Type N to re display the system prompt.   5. Type LABEL A: NEWNAME an...

FORMAT(2)

FORMAT /Q- Quick format takes less than 10 seconds; this command removes  the files allocation table and root directory; it does not scan the disk for bad areas. The /Q switch cannot be used if you change the capacity of the disk, i.e., format a 1.44MB diskette as 720K. FORMAT /V: labelname- Lets you assign a volume label. Otherwise, you are prompted to enter one of the following operation. Volume labels are uo to 11 characters long. FORMAT /F:size- Specify the size of the   disk belong formatted. Sizes are entered as follows.           Disk Size                   Use          5.25 160K                 160, 160k, 160KB          180K                         180, 180k, 180KB          320K      ...

Vol and Label

VOL The VOL command Displays the volume label of the current disk. Simply type VOL and press Enter to display the label. LABEL     The LABEL command is used to create, change, or delete the volume label on a disk. LABEL was introduced with DOS version 3.00 and a label deletion prompt was added with DOS version 3.10. To create a new volume (disk) label where none exists, type:   LABEL A:label name where label   name can be any name of your choosing up to 11 characters long. In this example, A is assumed as the logged disk drive. The following prompt is displayed to help you. Volume in drive A has no label Volume label (11 characters, ENTER for none)? _ You can change a label name by typing LABEL A: and pressing Enter. The following prompt is displayed: Volume in drive A is DATAFILE Volume label (11 characters, ENTER for none)? _ You can type the new name and press Enter. For example, you may use something like DISK #001. Pressing Enter without typing a new volume labe...

FORMAT

The FORMAT  command prepares a new disk for use by organizing the disk into magnetic tracks and sectors that are readable by DOS. when a disk is formatted, any files on that disk are usually lost. because of the plethora of disk types and capacities, new parameters were added to the FORMAT command in DOS  version 4.01. MS-DOS 5.00 introduction a safe FORMAT command and the ability to UNFORMAT unintentially formatted disks. These parameters and others are presented in the following paragraph and table. FORMAT Command Form:   There are a number of FORMAT command forms. These are described in the following list. CAUTION  BE aware that the FORMAT command erases all files from the disk being formatted.     Many computer users  have accidentally formatted the wrong disk. If you have programs or    document files  you wish to keep, do not format the disk! (DOS 5.00 lets you UNFORMAT     disk, but even with this ve...

Getting Ready

To perform the remaining activities in this blog, your DOS program files should be in the current directory, or a search path must be established to the directory containing the DOS command files. Assuming that you are using a hard drive system and your DOS file are located in the C:\DOS directory, you can type PATH=C:\DOS and press Enter from the DOS prompt to establish the search path. This automatically searches the specified directory for program files. Operation of the PATH command will be described in detail in Section 4 of this blog. If you are using a floppy disk system, your DOS files should be located on the disk in drive A.

Section 3 Introduction

Section 3 Preparing and Examining Disks  INTRODUCTION This section guides you through the commands used to prepare and examine disks. The commands presented includes: FORMAT     Used to prepare a disk for use with DOS and/or files. SYS              Used to transfer DOS to a formatted disk. VOL             Used to display a disk volume label. LABEL        Used to display or change a disk volume label. DIR              Display a list of filename on the designated disk or directory. CHKDSK    Checks available disk space and displays memory. MEM           Displays total available memory type.

CONCLUSIONS

Conclusion   The TIME, DATE, and VER commands are easy to use and understand. These are typical of most DOS commands. The command lines contained in the CONFIG.SYS and AUTOEXEC.BAT files, though more complex, are commonly used. More information is provided about the command lines found in the CONFIG.SYS file later in this blog. The effect of the command lines contained in the AUTOEXEC.BAT file are all described in detail, with supporting learning activities.

DOS CONFIGURATION AND AUTOMATIC EXECUTION FILES

The CONFIG.SYS and AUTOEXEC.BAT files can be used to set the way your computer responds to commands. The purpose of each of these files is briefly described. Although these files are not always essential to the proper operation of your computer, there are certain programs that depend on their presence. At this point in your exploration of DOS, you are not expected to make use of these commands. However, it is important to know what they are and how they can be used. When you finish this blog, you may wish to experiment with the effect of these files on the way your computer interacts with certain programs, its operating speed, and the allocation of memory. CONFIG.SYS When your computer is turned on, DOS  checks for a CONFIG.SYS file and adjusts your computor's configuration according to commands contained in that file. The CONFIG.SYS file is always found on the main directory of the DOS book disk. If you have a hard disk system, it is found on drive C, although you can boot from ...

Turning On Your Computer

Before turning on your computer, DOS must be present on the boot disk. The boot disk is the primary disk from which DOS loads into your computer's memory. This includes loading the boot record and DOS system files BIO.COM, DOS.COM, and COMMAND.COM. The purpose of each of these files is described in Section 1. A hard drive system is assumed in this blog, where your hard drive is most often designated as drive C. If you have a removable disk system, use A in place of C in the activities contained in this blog. If you have two removable disk drives, the second drive is designated as drive B.  The following diagram illustrates the two most common computer configurations. Date and Time Commands Your computer is equipped with a 24-hour system clock. The clock maintains the date and time as long as power is applied. Most new computers have battery-powered clocks which maintain the current date and time even when your computer is turned off. If you have an 80286-, 80386-...

Section 2 Getting Started

Section 2 Getting Started INTRODUCTION This section guides you through the process of turning on your computer, checking for important control files, setting the system time and date, and then determining what version of DOS you are using. Commands introduced include: DATE                 Display and sets the system date. TIME                 Display and sets the system time. VER                   Display the current DOS version in use by the system. Commonly used DOS files that are introduced and examined include: CONFIG.SYS     Configures memory and loads special device drivers at system turn on. AUTOEXEC.BAT    Automatically executes DOS commands that are included in this file.

DOS Programs (2)

Internal and External Commands Internal and External Commands:  There are  two kinds of DOS commands. These are called internal and external. The internal commands are loaded into memory when DOS is booted. Internal commands are always available for your use, although they are not seen when you display the disk directory of filenames on your screen. Some internal commands are: COPY                               copies files DEL or ERASE               delete files DIR                                  list are directory of filenames on the logged disk PROMPT                         changes the form of the system prompt REN                      ...

DOS Programs

DOS PROGRAMS Knowing a few things about DOS may help further your understanding of how DOS works, making you a more skilled DOS user. This section includes information about: System control programs  Internal and external commands DOS program summary Device designation (or names)   System Control Programs:   There are four essential programs associated with the control of your computer and the way it interacts with 1) programs; 2)your keyboard and display screen; and 3) attached devices like disk drives, printers, and modems. These are: Boot Record BIO.COM DOS.COM COMMAND.COM Only the COMMAND.COM program is displayed when you view a directory of filenames located on a disk. You can see the BIO.COM and DOS.COM programs by typing CHKDSK /V and pressing Enter (sometimes engraved Return ) which checks the files and storage space on your disk. The /V option lets you view filenames. The purpose of the system control program is briefly described for you in the following paragrap...

Disk Construction

The various parts of standard 5.25- and 3.5-inch disks are contained in Figure 1-2. A description of each part is also provided. Write protect notch--When covered, prevents information from being recorded on the disk; when uncovered, information can be recorded. Temporary label--An adhesive-backed label allowing the contents of a disk to be identified. Permanent label--When used, contains disk manufacturer and capacity information. Exposed recording surface--Metal oxide surface used to magnetically record data. Do not touch! Protective jacket --House magnetic disk; provides protective cover. Disk sleeve (envelope)--Used to store disks;prevents  accidental contact with exposed surface. Protective slide --Protects magnetic media surface; slides open when inserted into a diskette drive (only on 3 1/2-inch diskettes). Figure 1-2 The Parts of a Floppy Disk Construction : Almost everyone is familiar with audio recording tape. The tape is a long, flexible acetate or mylar strip coated wit...

DOS and Disks

Your computer is equipped with one or more diskette drives or a combination of diskette drives and a fixed (or hard) disk drive. DOS assigns different letter designations to disk drives. If you have a system with two diskette drives, the left-hand disk is normally logical disk A, while the right-hand disk is logical disk B. On some machines the disk drives are stacked. Check with the manufacturer to determine which is A and which is B. This book assumes that the disk containing DOS is either a fixed disk (drive C) or a floppy diskette  (drive A). Because most systems have fixed disks, drive C is most frequently used. If you have a floppy-disk system, substitute A: for C: in the practice activities. Although many use the term diskette to refer to a removable, flexible (or floppy) diskette, and disk to refer to a fixed disk, the term disk is used in this blog to refer to both disks and diskettes. When a fixed disk is specifically referenced, the terms fixed or hard disk are used. Dis...