Thursday, February 28, 2008

Using DOS: #3 The Directory & Formating

In computer file systems the root directory is the first or top-most directory in a hierarchy. It can be likened to the root of a tree - the starting point where all branches originate. This is like the index of a book. When you specify a file in some command like copy or delete and the O.S. accesses the file by using the name to look up the "track and sector" info in the directory. The command for this is DIR.


Using Directory:
DOS provides commands for dealing with directories:

  1. MD (MKDIR): To create a new subdirectory
  2. RD (RDDIR): To remove a directory
  3. CD (CDDIR): To move from one directory to another
  4. Tree: Displays all the subdirectories from any point in the directory tree. To see the directory structure of the whole
  5. DELTREE: Lets you remove a subdirectory structure even if it's not empty

Using the FORMAT command:

The function of the FORMAT command is used to prepare a disk or diskette for use by DOS or Windows. It also does the following:
  • Initializes a disk so that DOS can store information on it.
  • Examines the disk for any defective sectors and stores the information in the FAT (File Allocation Table).
  • Initializes the directory
  • Sets up space for the FAT
  • Records the boot program in the boot record
Example: After you reach the command center of DOS you type the following:

FORMAT [d:] [/s] [/v]

[d:]
is the drive with the disk to format
[/s] causes the operating system files to be transferred to the new disk
[/v] allows you to specify a "volume label" to identify the disk

****YOU CAN'T USE A DISK THAT HAS NOT BEEN FORMATTED; YOU NEED TO FORMAT IT FIRST. BUT, IF YOU HAVE A DISK THAT HAS INFORMATION ON IT AND YOU FORMAT IT, YOU WILL LOSE ALL OF THE INFORMATION THAT HAS BEEN STORED ON IT.

No comments: