APPLICATION NOTE #107: BASICS OF USING DOS Rev. 01 Before you can use XyWrite, you must load and use DOS. The purpose of this application note is to familiarize you with some fundamental DOS commands and conventions so you can be quickly on your way to using XyWrite. This note describes only the basics of key commands; it does not replace your DOS manual, which you should refer to for more complete information. WHAT IS DOS? DOS is an operating system Ä a program that tells a computer how each of its hardware devices must work in order to perform such basic tasks as writing data to diskettes, displaying information on the console, and taking input from the keyboard. DOS is also the interface between the hardware and any other software you are using. DOS is available in many different versions. Two of the most common are PC-DOS, which is the version used in the IBM family of computers, and MS-DOS. For the purposes of this application note, all versions operate in the same way, so we will refer to the program simply as DOS. GETTING STARTED When you see an A> (or B> or C>) on your screen, it means DOS is ready to receive a command. The A> is known as the system prompt. When you want to send a command to your computer, type it next to the system prompt and press (Return). There are two types of DOS commands: internal and external. Internal commands are built right into DOS and are available at any time. COPY and DEL are examples of internal DOS commands. External commands are stored on a diskette in files called command files. A command file is any file with a filename extension of .COM or .EXE. To use an external command, you must have the disk containing its command file in the current drive. External commands include DISKCOPY and FORMAT. Most DOS commands accept wildcards as part of a filename specification. Wildcards are special characters that allow you to specify more than one file with a single command. DOS recognizes two types of wildcard characters: * and ?. The * replaces one or more filename characters while the ? replaces only one character. For example, FILE?.TXT could be interpreted as FILE1.TXT, FILE2.TXT, FILEZ.TXT, or any FILEx.TXT. On the other hand, FILE*.TXT could be interpreted as FILE23.TXT, FILENAME.TXT, or any FILExxxx.TXT. MAKING A WORKING COPY OF YOUR DOS DISK All of the software you use, including DOS and XyWrite, is originally found on master diskettes. You use the master diskettes only to make working copies of the software they contain. This protects you in case of a disk or hardware failure. If a working disk is somehow damaged, all you have lost is a duplicate; you can still make a new copy from the master disk. On the other hand, if you use a master disk regularly and something goes wrong, you've lost your only copy of the program. To make a working copy of the DOS master diskette, follow this procedure. 1. Turn on your computer; place the DOS master diskette in drive A and a blank disk in drive B. 2. Press: Ctrl-Alt-Del Result: DOS first runs a memory test and then asks for the date. 3. Press twice. Result: DOS displays the A> system prompt. 4. Type: diskcopy a: b: Result: The program asks you to insert the source and target disks, which you already did in step 1. 5. Press any key when ready. Result: DOS duplicates the original disk, then asks if you want to copy another diskette. If you want to exit, type N; to copy another disk, type Y. LOADING DOS Before you can use your computer, you must first load DOS. This is called booting the system. (The term comes from the expression "pulling yourself up by your bootstraps") A special part of DOS, called a bootstrap, activates immediately as the computer begins to read DOS. The bootstrap loads the bulk of DOS into your computer's memory and then transfers control to DOS itself. To load DOS: 1. Turn on your computer and insert your DOS disk into drive A. Result: The system tests its internal memory and then displays a message similar to the following: Microsoft MS-DOS Version 3.20 (C) Copyright 1981-86 by Microsoft Corp. Current date is Tue 1-1-1980 Enter new date: 2. To enter the current date, type the month, day, and year, separated by hyphens or slashes (mm-dd-yy or mm/dd/yy) and then press . (If you do not want to change the date, press .) Result: DOS asks for the current time. 3. To enter the current time, type it in using the hh:mm format (e.g., 10:32) and then press . (If you do not want to change the time, press .) Note: DOS uses a 24-hour format to express time. To enter afternoon times, add 12 to the regular clock time (e.g., 2:30 p.m. is 14:30). You can also enter the seconds, but it is not required. CHANGING THE CURRENT DISK DRIVE As we've explained, the system prompt (A>) indicates that DOS is waiting for a command. The letter in the prompt also tells you which disk drive is active. (The active drive is also called the current, default, or logged drive.) Whenever you type a command, DOS performs it on the active drive unless you specify a different drive. To change the active drive, enter the new drive letter followed by a colon. For example, to change from drive A to drive B: At the A> prompt, type: b: FORMATTING A NEW DISKETTE New diskettes are completely blank. Before you can store data on them, you must prepare or format them. When you format a diskette, DOS divides it into several circular tracks, which are further divided into sectors. By electronically marking a disk, DOS creates a directory of locations for storing data. FORMAT is an external command, which means that the DOS disk containing FORMAT.COM must be in the current drive. The basic form of the command is: FORMAT d: where d: is the letter of the drive containing the new diskette you are formatting. The basic format is useful for preparing a disk that will contain only data files. FORMAT has two important options. With one option, you can set up an area on a diskette for the DOS boot files and then transfer those files during the formatting process. This option creates a formatted disk that contains enough information for your computer to start itself. This type of disk is called a bootable disk. To make a bootable disk, add /S to the FORMAT statement: At the system prompt, type: format b:/s The other FORMAT option can be used to write an electronic label on a diskette to help you identify what kinds of files are stored on it. A diskette label is also called a volume label. To label a diskette, add /V to the FORMAT statement: At the system prompt, type: format b:/v A volume label can be up to 11 characters long using any letter or number. If you change your mind and decide you don't want to give the diskette a label, just press . As an example, let's create a bootable diskette with an electronic label on it. 1. Insert a copy of your DOS disk in drive A and a new floppy diskette in drive B. 2. At the A> prompt, type: format b:/s/v Result: DOS responds by telling you to insert a new diskette for drive B and strike when ready. 3. You inserted a new diskette in drive B during step one, so just press . Result: DOS begins to format the disk. When it is done, it displays the message: Formatting...Format complete. System transferred Volume label (11 characters, ENTER for none)? 4. Enter the name you want to assign to this diskette (for example, WORKDISK), then press . Result: DOS completes the formatting process, electronically labels the disk, and displays the message: 362496 bytes total disk space 70656 bytes used by system 291840 bytes available on disk Format another (Y/N)? The actual figures that appear on your screen may differ from the example above. If you want to format another disk, type Y. Type N to return to the system prompt. DISPLAYING A FILE DIRECTORY If you want to know what files are on a disk, you can use the DIR command to display a list of filenames, their size, and the date and time they were stored. You can use different options to display this list a screenful at a time or to display the filenames only. To display a directory of drive B: At the system prompt, type: dir b: Result: DOS displays a list of filenames, along with the size of each file in bytes and the date and time the current version of each file was stored. (Every time a file is created or modified in some way, DOS stamps it with the current date and time.) The last line of the table tells how many files are on the diskette and how much space remains for additional files. If you want to display a list of files without including their sizes or creation dates, add /W to the DIR command. If your disk directory is long, add /P to have DOS pause after the screen is filled. You can then press any key to view the next screenful of the directory. You can also use wildcard characters (* and ?) to display a partial list of files. For example: At the system prompt, type: dir b:*.txt/w/p Result: DOS displays, one screenful at a time, a list of files that have the extension .TXT. Only the filenames are listed Ä not the file size or creation date. COPYING INDIVIDUAL FILES You can copy individual files to another disk or to/from a hard disk. You can also copy files under a different name on the same disk as the original files. COPY is an internal command which has the following basic form: COPY d:filename d:targetfile/V where d: is the drive letter, filename is the name of the file you want to copy, and targetfile is the name of the new file. You don't have to specify the drive letter (d:) if the file is on the current drive, and you can eliminate targetfile if you want the copy to have the same name as the original file. You can use wildcard characters (* or ?) to copy more than one file. The /V at the end of the command line is called the verification option. When you include /V in the command, DOS checks the copy file to make sure it is an exact duplicate of the original. Although not required, it's a good idea to include the /V option. The following are examples of the COPY command. copy a:oldfile.txt b:copyfile.txt/v Copies oldfile.txt from drive A to copyfile.txt on drive B. copy a:oldfile.txt b:/v Copies oldfile.txt from drive A to oldfile.txt on drive B. copy a:oldfile.txt a:copyfile.txt/v Copies oldfile.txt from drive A to copyfile.txt on drive A. copy a:*.txt b:/v Copies all files with the .txt extension on drive A to files with the same names on drive B. copy a:oldfile.* b:/v Copies all files with the root name oldfile and any extension on drive A to files with the same names on drive B. copy a:*.* b:/v Copies all files on drive A to files with the same names on drive B. This is one of two ways to copy an entire disk. DUPLICATING ENTIRE DISKETTES It is a good idea to regularly make backup copies of your disks. There are two different ways to duplicate a diskette. One method, described in the previous section, uses the DOS COPY command to copy a disk file-by-file. The advantage of this method is that you can use the /V option to ensure that each file copy is an exact duplicate of the original. A disadvantage is that COPY cannot transfer all the special DOS system files from one disk to another. The second method of duplicating a diskette is to use the external command DISKCOPY. Instead of copying a disk file-by-file, DISKCOPY copies a disk track-by-track, including the system tracks. This procedure is faster than copying a long series of files. To use the DISKCOPY command: 1. Insert your DOS disk into drive A and a blank diskette into drive B. Your blank disk does not have to be preformatted. 2. At the system prompt, type: diskcopy a: b: Result: DOS responds with the following: Insert source diskette in drive A: Insert target diskette in drive B: Strike any key when ready 3. Remove the DOS disk from drive A, replace it with the disk you want to copy, and press any key. Result: The program displays the following: Copying 40 tracks 9 sectors per track, 2 sides(s) Formatting while copying Copy complete Copy another (Y/N)? 4. Type Y if you want to copy another disk; otherwise, type N. RENAMING A FILE DOS lets you rename a file after it has been created. To do this, you use the RENAME (or REN) command. RENAME is an internal command. It has the following form: RENAME oldname newname The drive and directory must be identical for both old and new filenames. You cannot use RENAME to transfer a document to a different drive or directory. ERASING A FILE One of the simplest commands in DOS is the ERASE (or DEL) command. However, it is also one of the most dangerous because one mistake can cause the wrong file or group of files to be erased. In extreme cases, an entire diskette can be lost. Always make sure you are erasing exactly what you want to delete. Both ERASE and DEL are internal commands and can be used interchangeably. You can erase one file by typing either of the following at the system prompt: ERASE d:filename DEL d:filename You can erase a group of files or an entire disk using the * wildcard. For example, to erase all files on drive B, type one of the following commands at the system prompt: erase b:*.* del b:*.* Result: When you issue this global form of the command, DOS displays the message Are you sure (Y/N)? before carrying out your instructions. Be very careful with this form of ERASE/DEL because, once executed, it erases your entire disk. Type Y to complete the process or N to abort the command. TRANSFERRING SYSTEM FILES DOS gives you several ways to transfer the special DOS boot files to a diskette. Some of those methods have already been presented in previous sections. This section covers how to copy the DOS boot files to a disk that already has data files in its user area, but has blank system tracks reserved. Many copy-protected applications programs have reserved the system tracks so that you can put DOS onto the program diskette. If you want to do this, you cannot use any of the methods previously discussed (FORMAT, DISKCOPY) because those methods would erase the disk's files. The SYS command allows you to transfer system files and retain whatever else is on the disk. SYS is an external command that transfers two hidden DOS system files (MSDOS.SYS and IO.SYS for the MS-DOS version or IBMDOS.COM and IBMBIO.COM for the PC-DOS version) to a disk that already has information on it. The target disk must have been formatted so that space was reserved for these files. SYS can also be used to update DOS from an older version to a more current one. To use the SYS command: 1. Insert the DOS disk in drive A and target disk in drive B. 2. At the A> prompt, type: sys b: Result: The SYS utility transfers the DOS system files listed above. 3. When the A> prompt returns: Type: copy command.com b:/v to transfer the remainder of the DOS system. Note: Not every disk will accept a SYS transfer. To use SYS, the target disk must be specifically formatted to reserve a portion for the system files. If this hasn't been done, you will get an error message when you attempt to use SYS. GETTING DISK INFORMATION The disk information command (CHKDSK) tells you how much space remains on a disk, the amount of space taken by certain types of files (e.g., hidden files, user files, etc.), the total amount of RAM your computer has, how much memory is available, and whether a file is saved in continuous or random blocks of file space. You can use CHKDSK to test the integrity of a disk and to perform limited repairs to a damaged disk. CHKDSK is an external command that has many options. Below is a list of the most frequently used options. CHKDSK d: (Option 1) Reports the name and creation date of the disk in drive d:. Also reports the total capacity of the disk, the amount used by the system and user files, the amount of free space remaining, the amount of RAM space available, and any disk errors that exist. CHKDSK d: filename (Option 2) Reports the same information as Option 1 and also reports whether filename is stored in consecutive or random sectors. CHKDSK d: filename/V (Option 3) Reports the same information as Option 2 and also displays each filename as it is checked. CHKDSK d:/F (Option 4) Reports the same information as Option 1 asks if you want to repair the disk by changing the disk errors (lost clusters) into files. If you answer yes, CHKDSK repairs the disk and creates one or more files with the name FILEnnnn.CHK (nnnn is a number beginning with 0001). To complete the repair process: At the system prompt, type: del file*.chk COMPARING TWO DISKS DISKCOMP is an external command that compares two diskettes to ensure that they are identical. This command is almost always used after the DISKCOPY command. Note: DISKCOMP cannot be used to verify disks duplicated with the COPY *.* command. That method copies a diskette file-by-file, possibly changing the disk's file order. DISKCOMP works only after duplicating a diskette with the DISKCOPY command. To use the DISKCOMP command: 1. Insert the DOS disk in drive A and the copy in drive B. 2. At the system prompt, type: diskcomp a: b: 3. Remove the DOS disk from drive A and insert your original disk. Press any key to continue. Result: If the disks are identical, DISKCOMP displays the message "Diskettes compare ok." Any other message means the disks are different. You can also use DISKCOMP to verify two single-sided disks. To use this form of the command: At the system prompt, type: diskcomp a: b:/1 Another option allows DISKCOMP to compare disks formatted under version 1 of DOS. Early DOS disks used a format of eight sectors per track instead of the nine-sector-per-track format used by DOS versions 2 and 3. To compare disks formatted with DOS version 1: At the system prompt, type: diskcomp a: b:/8 SETTING SYSTEM TIME AND DATE Whenever you create a file, DOS stamps it with the current date and time. In order for DOS to do this, you must supply the correct date and time when you boot the system. Once you enter them, DOS continuously updates both parameters until you turn off your computer. Two internal DOS commands allow you to display and reset the date and time at any point after booting the system. The DATE command displays the current date followed by a request for you to enter a new date. If you want to keep the date as it is, press . If you want to change it, type the new date using the form mm/dd/yy or mm-dd-yy. The TIME command displays the current setting and asks you to enter a new time. Press if you don't want to change the time; otherwise, type a new time in the form hh:mm:ss. Remember that DOS keeps time in a 24-hour format. The a.m. hours can be entered as usual, but add 12 to a p.m. hour. CLEARING THE SCREEN The CLS command is an internal command that clears the screen and places the cursor in the screen's upper left corner. To use the CLS command: At the system prompt, type: cls CHANGING THE VOLUME LABEL DOS version 3 has an external command called LABEL that allows you to change the volume label of a disk after it has been formatted. The format of the command is: LABEL d: When you issue the LABEL command, the DOS disk must be in the current drive. When DOS asks for a volume name, you can use from one to eleven characters. If you decide not to name the disk or if you want to keep the disk's current name, press without typing anything. UPDATING DISKS DOS versions 3.20 and greater have an external command called REPLACE that allows you to update previous versions of files on a hard drive or floppy. REPLACE does this by copying files with the same name from a source disk to the disk that needs to be updated. It also can be used with DOS subdirectories. The command has the form: REPLACE d: d1: /options You can include path names to specify subdirectories for both the source (d:) and target (d1:) drives (see the section on subdirectories later in this application note). Six option switches can be included in the command to control which files are replaced. These options are: /A This option adds new files to the target disk or subdirectory instead of replacing them. /D This option replaces files in the target disk only if the source files are newer than the same files in the target disk. /P This option causes REPLACE to ask you to verify each replacement or addition. /R This option replaces read-only files as well as normal files. If you omit this option, any attempt to replace a read-only file will stop REPLACE. /S This option causes REPLACE to look in all the target disk's subdirectories to attempt to match files from the source disk. Any files REPLACE matches will be replaced, no matter where the files are located on the target disk. /W This option waits for you to prepare your source and target disks and press any key before beginning. Without this option, REPLACE begins to work immediately. REPLACE cannot be used to update hidden or system files associated with DOS itself or any other applications program. DISPLAYING DOS VERSION The VER internal command displays the version number of DOS currently loaded in memory. To use the VER command: At the system prompt, type: ver VERIFYING DISKS The internal command VERIFY forces DOS to verify data it writes on a disk. This verification is the same as that performed by the DISKCOMP command or by the COPY command with the /V option. To turn verification on: At the system prompt, type: verify on To turn verification off: At the system prompt, type: verify off To determine if verification is on or off: At the system prompt, type: verify Result: DOS displays the message "VERIFY is off" or "VERIFY is on." DISPLAYING VOLUME NAME The internal command VOL displays the name of the disk in the current drive. If you include a drive specification, VOL displays the label of the disk in that drive. CREATING A BATCH FILE Usually, you enter DOS commands directly from the keyboard, and the system processes the commands one at a time. For most operations, this method of entering commands is fine. However, there may be tasks that you perform frequently that involve the same series of commands. You can save time and reduce the chance of typographical errors if you store the series of commands in a batch file. Batch files allow you to send a group of commands to DOS without having to wait for the system prompt to return. You can even write a special batch file to automatically start a program whenever you start your computer. The DOS batch facility is built into COMMAND.COM. Whenever COMMAND.COM is available on your default drive, you can run a batch file. DOS treats batch files in the same way it treats command files (those that have a filename extension of .COM or .EXE). To run a batch file, just type the name of the file at the system prompt, and press . You can use any version of XyWrite to create your batch files. Use the NEW command just as you do to create any other text file. A batch file can have any name you choose (from one to eight characters), as long as it has a .BAT extension and is not the same as a command filename that is on the same disk. For example, you cannot name a batch file EDITOR.BAT if that file is on the same disk as the XyWrite program, EDITOR.EXE. When writing a batch file, type each command exactly as you would if you were entering it at the system prompt, and end each command (except the last) with a carriage return. For example, to display the directory of the disk in drive B and then load XyWrite, you would create a new file (for example, XYDIR.BAT) and enter the following commands into it: dir b: editor Store the file and, when you are ready to run it: At the system prompt, type: xydir You don't have to include the .BAT extension when you type the batch filename. Using Arguments with Batch Files DOS batch files can be more complex than the example above. Let's say you want a batch file to report a directory of drive B, run XyWrite, and display a XyWrite file. If you want to use the same text file, say SCHEDULE, every time, you could write the batch file this way: dir b: editor b:schedule A more flexible batch file would allow you to select a different file each time you run XyWrite. To do this, you include an argument substitution character in the batch file. Argument substitution characters tell DOS to replace the character with a filename included in the batch statement. The substitution character has the form %1, %2, and so on, up to %9. Using the previous example, XYDIR.BAT would look like this: dir b: editor b:%1 To run the batch file, you would type, at the system prompt, the name of the file you want to call. For example, to run XyWrite and call up the file AGENDA: At the system prompt, type: xydir agenda DOS substitutes AGENDA for the %1 character. If you need to write a batch file with more than one variable, use %1 to designate the first file, %2 for the second file, %3 for the third, and so on. You can normally have as many as nine variables in a batch file. The AUTOEXEC.BAT File Every time you start DOS, it searches for an AUTOEXEC.BAT file and, if found, executes its commands. Other than its ability to auto-start, an AUTOEXEC.BAT file works exactly like any other batch file. When you install XyWrite, it automatically creates an AUTOEXEC.BAT file on your working diskette or in the root directory of your hard disk. Otherwise, you create this file just as you create any XyWrite text file: F5new autoexec.bat. Note: When DOS finds an AUTOEXEC.BAT file, the normal requests for the date and time are bypassed. If you want to have these parameters set from inside AUTOEXEC.BAT, include the DATE and TIME commands in the file. USING SUBDIRECTORIES Subdirectories allow a DOS disk to be divided into several logical storage areas. They help define several areas of a disk that can be used for storing related groups of files. One area might contain word processing programs while another might contain spreadsheets and still another a communications program. Normal DOS disks contain one directory where all program and data files are stored. This is usually enough for a standard floppy disk because it's unlikely you'll need more than the 64 (single-side) or 112 (double side) files each directory can have. However, if you own an AT-compatible which has a high-density disk drive or a computer that has a hard disk, you may need to store many more files than the limit. Even if you don't need to store a great number of files, you may still want the option of grouping files together in special areas to better manage your disks. Designing a Subdirectory System When you design a subdirectory system for your disk, you start with a main directory on top. From there, you might create two subdirectories, one to hold your XyWrite files and another to hold spreadsheets. Under these, you might build additional subdirectories to hold program and work files. Further subdirectories could be added under these. When completed, you have a system that looks something like an upside down tree. In fact, that's exactly what this type of system is called: a tree structure. Every tree structure begins with a main directory called the root. This is the area that DOS uses after it starts. If subdirectories have been defined, all of them are ultimately linked back to the root. Within a tree structure, subdirectories that are immediately below other subdirectories are known as child directories. Along the same lines, those subdirectories that are above others are known as parent directories. Rules for Using Subdirectories Every time you define a subdirectory, you must give it a unique name. It's always a good idea to give a subdirectory a descriptive name. The rules for naming subdirectories are the same as those for naming a file. Although an extension is allowed in a subdirectory name, it's not necessary and probably not a good idea to use one. DOS usually recognizes a subdirectory by its name. In addition, three types of subdirectories can also be recognized by special symbols. The root directory, which doesn't have a special name, is recognized by the \ symbol. Once you enter a subdirectory, its parent is recognized by ".." (two periods). A single period refers to the current subdirectory. These last two symbols can be used anywhere in a tree structure except the root, because the root doesn't have a parent and already has a special symbol to refer to itself. Path Names Every subdirectory is linked in some way to the root directory. These links, called paths, are like a highway system connecting a series of outlying towns to a central city. If you think of the subdirectory files as houses in one of the towns, then each house (file) must have a unique address so you can get to and from it. In DOS, these addresses are called path names. A path name begins with a backslash (\), which here is used as delimiter. As an example, say you have a disk that contains a subdirectory called XYWRITE whose parent is the root directory. Under XYWRITE is a subdirectory called WORKFILE. In WORKFILE is a text file called MYFILE.TXT. In order to tell DOS where to locate MYFILE.TXT, you would use the path name: \xywrite\workfile\myfile.txt Remember that the first \ refers to the root directory while the other \ characters are just delimiters. Path Commands DOS has five special commands that are used to manage subdirectories. With them, you can create or delete subdirectories, change the current subdirectory, print out a list of a disk's tree structure, or tell the system where to find a command or batch file if it isn't in the current subdirectory. These commands are collectively known as path commands or tree commands. Creating a Subdirectory Ä MKDIR (or MD) is used to create new subdirectories from the current directory. The two commands are internal commands and may be used interchangeably. To create a subdirectory called XYWRITE from the root directory: At the system prompt, type: mkdir xywrite To create the subdirectory PROGRAM under XYWRITE: At the system prompt, type: mkdir \xywrite\program The complete path name, including backslashes, cannot exceed 63 characters. Changing Subdirectories Ä The CHDIR (or CD) command is used to switch from one subdirectory to another. They can also be used to display the name of the current subdirectory. The general form of these internal commands is: CHDIR \pathname where pathname is the list of subdirectories leading to the one you want to use. To change to the root directory: At the system prompt, type: chdir \ If you type CHDIR without a pathname, the command displays the name of the subdirectory you're currently using. Removing a Subdirectory Ä Whenever you want to remove a subdirectory, you can use the internal command RMDIR (or RD). Before you delete a subdirectory, you must erase all of its files with the ERASE command. If any subdirectories exist below the one you want to delete, they must first be erased with RMDIR. The basic command is: RMDIR \pathname\subname where subname is the subdirectory you want to remove. To remove a child of the root directory, type: RMDIR \subname To remove a child of the current directory, type: RMDIR subname Displaying a List of Subdirectories Ä The external command TREE is used to find out what subdirectories are on a disk. To display the subdirectories on drive B, be sure TREE.COM is on the current drive, then: At the system prompt, type: tree b: If you include the /F option in the command, TREE also lists the files in each subdirectory. Specifying Location Ä The PATH command tells DOS where to look for a command or batch file if it isn't in the current subdirectory. The form of the command is: PATH path1;path2;path3 . . . with each pathname separated by a semicolon. A PATH command without any arguments lists the current search path. DOS can search only for files with a .COM, .EXE, or .BAT extension. It cannot search for normal data files or program file overlays (with an .OVL extension). Using the DIR Command with Subdirectories When you use DIR from the root directory, DOS displays a complete listing of a disk's tree structure as well as any root files. When run from a subdirectory, DIR reports all of the files in that subdirectory as well as the names of any child directories. You'll also see the . and .. entries, which represent the current and parent subdirectories, respectively.