Dos 2.0 has how many directories

File management


So far, we've only really got to know one drive: the floppy disk drive. And from the explanations so far you have correctly concluded that the floppy disk drive is simply called A: under DOS and Windows. Incidentally, this is largely independent of the PC and the operating system version.

If you have a second floppy drive, in all likelihood it is drive B :. There are historical reasons why the first two letters are used for something old-fashioned like floppy disk drives and the hard disk is first given the letter C :. So:

  • A: 1. Floppy disk drive
  • B: 2nd floppy disk drive
  • C: hard disk

So the simplified representation. The third line is no longer exactly right. But more on that below.

How it continues after C: depends very much on your PC and how it is configured.

Hard drives

What is a hard drive anyway? Nothing more than a "floppy disk", a magnetic disk that is permanently built into your PC. (More precisely, there are several slices on top of each other, but that is not so important here). It serves exactly the same purpose as a floppy disk drive: to back up data and programs that are in the (volatile) main memory. A hard drive is much faster than a floppy disk and it is much, much bigger. Unfortunately, it is actually much too big for our purposes here. Because even the smallest hard drives that you can buy in stores are so big today that you inevitably lose track of them very quickly. Today's hard drive can easily store 1 million files (!). A floppy disk is full after 100 or 200 files at the latest. So I prefer to use a floppy disk to explain things.


A physical hard disk can be divided into several parts, so-called Partitions that behave from DOS as if they were different hard drives. That's why they get different letters. My PC, which I am currently sitting at, has two partitions with the letters C: and D :. Now you understand why I was incorrect earlier when I wrote that C: was the hard drive. C: is a partition the hard drive and often there is a second or third one. Example of another configuration that I know of:

  • A: floppy disk drive
  • C: 1st partition of the hard drive
  • D: CD-ROM drive
  • E: 2nd partition of the hard disk
  • Q: 3rd partition of the hard drive
  • G: Directory of a drive connected via the network.
  • H: Removable storage device ZIP

Current drive

The current drive is the one on which the interpreter searches for files and directories (see below). It is in the so-called prompt, the characters that indicate where the cursor is, e.g. A: \> displayed. Here is A: the current drive. (The colon after the drive letter is also used to distinguish the drive letter from a file of the same name.)

Files and directories

A directory, engl. directory, you have to think of yourself as a Leitz folder that holds your individual documents. It's a name under which you can put a lot of files and refer to them. The need for directories arises when you manage more than ten files on a data carrier (e.g. floppy disk), because then you lose the overview on the screen with a DIR command.

A couple of DOS commands

Command mkdir

This creates a directory

A: \> mkdir prog creates a directory called "prog". If you now enter a dir command, it will show you the name "prog" followed by the word instead of a byte. The "mkdir" command corresponds to the "New Folder" / "New Directory" command in the context menu of Windows Explorer.

With "A:> dir prog" you can display the content of prog. Of course there is nothing in it.

Command copy

... copies a file. You have to specify the target directory.

A: \> copy edlin.exe prog

... copies the edlin.exe file to prog. prog is the target directory. Then an "A: \> dir prog" shows a file edlin.exe, of which there is now a copy in prog.

If the target directory is not a directory at all, "copy" assumes that it is a file name, namely the name of the copy that is being created.

A: \> copy edlin.exe edlin2.exe

makes a copy of edlin.exe called edlin2.exe.

Command del

"del edlin2.exe" deletes the edlin2.exe file. del can only be used on files, not directories.

Command cd

... means "change directory" = change the current directory. A: \> cd prog .. changes to the prog directory. The prompt then shows that current directory A: \ prog>.


A "path" is the path that you have to go through the directories, from the root of the drive into the subdirectories, in order to find a file. A path is via the Pathnames Are defined. Each file has a path name. It consists of the specification of all directories and subdirectories in which the file is located, including the file name itself. A: \ prog \ edlin.exe is the (absolute) path name of the edlin.exe file. Note

  • Directories and subdirectories are separated from each other by a \ (backslash).
  • A leading \ denotes that Root directory of the current drive, so to speak the drive itself. With "\ prog" you name a directory called "prog" which is in the root directory of the current drive (regardless of whether the latter is A :, B: or K:).
  • If you omit the leading \, the rest is a path relative to the current directory. If the current directory is A: \ prog and you enter "edit \ edlin.exe" as the path name, you mean "A: \ prog \ edit \ edlin.exe".
  • A single point indicates the current directory. A: \> cd A: \ prog A: \ prog> copy A: \ edlin.exe. So copies the edlin.exe file into the current directory.
  • Two dots in a row ("..") designate the higher-level directory ("upper directory"). \ is the top directory of \ prog and \ prog is the top directory of \ prog \ edit. A: \> cd A: \ prog \ edit A: \ prog \ edit> cd .. A: \ prog>

Further DOS commands

Abort commands

With Ctrl-C (or Strg-C) you can cancel the activity of a program at any time.

Command rmdir

... deletes a directory, but only when it is empty. You have to delete all files in the directory with del and all subdirectories with rmdir beforehand. You will ask: And how do I delete a directory with all files and subdirectories in one set? Not at all. You are forgetting one thing here: Sending such a command can cost you weeks and months of your work. So the creators of DOS did not intend it. And one more thing: In Windows, you can get files back accidentally deleted from the Recycle Bin. Not so here under DOS. What's gone is gone!

Command format

And what do you do when a floppy disk has hundreds of directories and small files on it? And this floppy disk, for example, comes from someone else's "garbage dump", so that there is no risk of you deleting valuable files? Well then you can recreate the floppy disk format. But go with it very careful around. If you don't concentrate, you can break your whole computer!

What does "formatting" mean? In order for the computer to be able to handle it, the floppy disk needs to be divided into so-called Sectors, the disk format. And this division is re-established when formatting. All data on the floppy disk will be lost.

The command is "format ". can not only be a floppy disk drive, but - and this is the dangerous thing - also a hard disk partition! So when you reformat a floppy disk, close your eyes for a moment, relax, then concentrate all of your concentration and begin your work knowing that you are doing something very important and dangerous.

If the formatting process has not yet started (a percentage is slowly counted up), you can cancel it at any time with Ctrl-C.


DOSKEY improves the convenience of the DOS interpreter. Simply enter DOSKEY + ENTER and you have the DOSKEY functions available. The most important of these: You can use the up arrow key to retrieve previous commands.

DOS help and command line parameters

For our programming purposes, this DOS knowledge will be enough for us. But there is a lot more user comfort under DOS. There are two ways to get help on a particular command.

  • "
  • "help

The former always works, the latter only with built-in DOS commands.

In particular, this help also provides you with information about the Command line parameters of an order. You can use the parameters to influence the effectiveness of a command. Example:

dir / s lists the contents of the current directory and all subdirectories on. ".. and all subdirectories" is what the "/ s" parameter does. If you you /?

you will get a list of all command line parameters from you. You can also enter -a, -d, -o or other parameters. The same applies to copy, del, etc.