Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Мир компьютеров.doc
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
430.59 Кб
Скачать

The dos Directory

DOS stores files on a disk in a directory, a list of the files stored on a disk or a portion of a disk. The primary directory is called the root directory. DOS also allows you to create subdirectories under the root directory. Thus, you can keep your programs and data well organized and easy to find. For example, you could keep your DOS program in the root directory, your word processing program in a subdirectory, and the files you create in word processing in a subdirectory off the word processing subdirectory. Both floppy disks and hard disks can be organized into directories.

Today. Commonly Used dos Commands

These DOS commands will help you understand DOS better and perform some important tasks at the same time. It's extremely important that you type DOS commands precisely, using the correct DOS syntax, or else you will get the "Bad command or file name" error message. DOS requires that you insert blank spaces (using the keyboard's space bar) or certain punctuation marks in many commands; watch for them.

DIR (directory). One of the most important things we need to know about a disk, whether floppy or hard, is what files it contains. We learn this by using the DIR command, which lists a directory of the disk's contents.

FORMAT. All disk drives do not work in exactly the same way; therefore, the blank disks you buy must be formatted for the type of personal computer you use. FORMAT is a command that formats or creates an electronic pattern on the floppy disk. This pattern divides the disk into tracks and sectors, where specific parts of application programs and data will later be stored. Tracks are concentric rings, like growth rings in a tree, while sectors are like slices of a pie. Once a disk is formatted, it can be read from and written to by your computer.

DISKCOPY. The DISKCOPY command copies the entire contents of one disk to another. The correct DOS syntax is that the first drive designation (A) is the drive you are copying from, and the second is the drive you are copying to.

Certain hidden files make a disk bootable or able to awaken the personal computer. A hidden file contains software information that is the copyrighted property of the computer company; we have no need tо gain access to these hidden files. If the disk we were copying from contained the hidden files, they will be copied along with all the others, thus making the new disk bootable as well. The DISK-COPY command has another useful feature. If the target disk has not been previously formatted, DISKCOPY will format it as well. When DISKCOPY is finished, a message asks, “Copy another diskette? (Y/N).” You can make another copy of the same disk in drive A, or you can insert another disk to copy. If you are finished, type N

then press ENTER, and you will be returned to the DOS prompt, ready to issue a new command.

Changing drives. The command to change a drive is simple: just type the drive designation and a colon together. If you are on the A drive and wish to change to the С drive, type C:

then press Enter.

COPY. The COPY command is a much more flexible command than DISKCOPY. It allows you tо copy a single file, a group of files, or all the files on a disk.

DELETE. The DELETE command eliminates an unwanted file from a disk, thereby making room for new file storage. When typing, DELETE can be abbreviated DEL. The DEL command syntax performs identically to COPY; we can delete a single file or, using the asterisk (*) wildcard, a group of files, or all files.

RENAME. Since a DOS filename can only be eight characters long, we often must abbreviate a name or make it unintentionally difficult to understand. Later, however, we might think of a filename that is easier to remember or that better identifies the file contents. The RENAME command allows us to change the file's filename, its filename extension, or both. The RENAME command can be abbreviated REN.