Thursday, March 24, 2011

OPERATING SYSTEM BASICS:7 Working With Directories

Working With Directories

In hard drive-based systems, it is common to organize related programs and data into areas called directories. This makes you easier to find and work with them since modern hard drives are capable of holding large amounts of information. Most directories can hold up to 512 directory or filename entries. Note that Microsoft directories can hold up to 512 directory or filename entries.
The following list of commands is used for directory-based operations in a Microsoft system.

DIR: Lists the files on the disk that is indicated by the drive specifier.
Some examples of the DIR command are:
C:\>DIR or DIR B: Displays the content of the specified drive indicated by the drive letter. If no drive letter is specified, the content of the drive indicated by the prompt will be displayed.
C:\>DIR/W: Displays the entire directory at a time across the width of the screen.
C:\>DIR/P: Displays the content of the directory one page at a time. You must press a key to advance to the next display page.

MKDIR (MD): Creates a new directory in an indicated spot in the directory tree structure.
C:\>MD C:\DOS\XXX will create a new subdirectory named XXX in the path that includes the ROOT directory (C:\) and the DOS directory.

CHDIR (CD): Changes the location of the active directory to a position specified with the command.
C:\>CD, C:\DOS will change the working directory from the C: root directory to the C:\>DOS directory.

RMDIR (RD): Erases the directory specified in the command.
You cannot remove a directory until it is empty and you cannot remove the directory if it is currently active. For example:
C:\>RD C:\DOS\forms would remove the DOS subdirectory forms, provided it was empty.

PROMPT: Changes the appearance of the DOS prompt.
C:\>PROMPT $P$G will cause the form of the prompt to change from simply C: to C:\ and will cause the complete path from the main directory to the current directory to be displayed at the DOS prompt.
TREE: Lists all directory and subdirectory names on a specified disk.
C:\>TREE C will display a graphical representation of the organization of the C hard drive.

DELTREE: Removes a selected directory and all files and subdirectories below it.
C:\>DELTREE C:\DOS\DRIVER\MOUSE will delete the subdirectory
Mouse and any subdirectories it may have.
In this video you will see an example on how to work on directories.


           

No comments:

Post a Comment