Disk Operating System
Disk Operating System
Internal Commands:
Internal commands are loaded with MS-DOS into system memory. They are contained with the command processor, COMMAND.COM. Internal commands can not be altered or deleted and do not appear in the listing of the MS-DOS directory. The following are some internal commands: CLS PATH PROMPT DATE TIME DEL REN TYPE COPY VER RD MD CD DIR VOL
External Commands:
External commands are contained with in individual files with extension of COM or EXE. These commands can be copied, renamed or deleted and appear in the listing of the MS-DOS directory. The following are some external commands: FORMAT UNFORMAT CHKDSK DISKCOPY DISKCOMP XCOPY UNDELETE MOVE PRINT TREE
Function/Shortcut Keys
F1 F2 F3 Ctrl + C Ctrl + M Ctrl + S Displays the previous command, one character at a time Displays all characters in the previous command up to the character that was entered after the F2 key is pressed. Display the previous command. Terminates/ cancels the current command. same as enter key, Pause Resets the computer.
Using Extensions
The following rules apply to filename extension: Use a period followed by a maximum of three characters for the extension. Choose the characters for the extension from the same list of rules used for the file name. Do not use any spaces between the file name and the extension.
Root Directory
The Root Directory (\) is the main directory on a disk. MS-DOS creates the Root Directory each time it format a disk. The Root Directory cannot be removed. The maximum number of entries in a root directory depends on the capacity of a diskette or hard drive. For example, the root directory on a formatted 1.44 MB diskette can contains up to 224 entries. The root directory on a hard drive can stores up to 512 entries.
Sub Directory
All directories below the root directory are called subdirectories. Subdirectories can contain any number of files and other subdirectories. Some limiting factors are the amount of space available on the disk and the maximum number of characters (64) for a path.
Current Directory
The current directory is the directory in which you are currently working. For Example:
C:\Windows>
Windows is a current directory in above example.
Parent Directory
The parent directory is one level above the current directory in the tree structure. For Example: C:\WINDOWS\MSOFFICE> WINDOWS is the parent directory of MS-OFFICE in the above path.
Create a Directory
To create a directory, use the MKDIR or MD command. C:\>MKDIR C:\ABC or C:\>MD C:\ABC
Change Directory
To work in other directory, use the CHDIR or CD command. C:\>CD C:\WINDOWS CD\ CD (Enter key) CD.. Change from C root directory to c:\windows Change from current directory to root directory Display current directory name Change from current directory to parent directory
Display files and Directories with the attributes you specify DIR/AH DIR/A-H DIR/AS DIR/A-S DIR/AD DIR/A-D DIR/AR DIR/A-R
Displays hidden files only Displays files that are not hidden Displays system files Displays files other than system files Displays directories Displays files only Displays read only Displays files those are not read only
Display files and Directories with the sort order DIR/ON DIR/O-N DIR/OE DIR/O-E DIR/OD DIR/O-D DIR/OS DIR/O-S DIR/OG DIR/O-G
Displays list by name in alphabetical order. Displays list by name in reverse alphabetical order. Displays list by extension in alphabetical order. Displays list by extension in reverse alphabetical order Displays list by time and date, earliest first. Displays list by time and date, latest first. Displays list by size, smallest first. Displays list by size, largest first. Displays grouped directories first then files Displays grouped files first then directories
Deleting Directory
To remove directory, use RMDIR or RD command. For Example: RD C:\ABC To remove the \ABC directory, you must remove first files and subdirectories in side the ABC. You cannot remove current directory. You must first change directory to at least one level above the directory you are removing. For Example: C:\MSWORD\LETTERS> C:\MSWORD\LETTERS>DEL *.* C:\MSWORD\LETTERS>CD.. C:\MSWORD\>RD LETTERS or C:\>RD C:|MSWORD\LETTERS
XCOPY
Copies files and directories. Syntax: XCOPY source destination /p/w/s/e P W S E Prompts you before copying each file. Prompts you to press a key before copying. Copies directories and subdirectories except empty ones. Copies directories and subdirectories including empty ones.
DEL
Deletes one or more files. DEL [drive:] [path] filename [/p] ERASE [drive:] [path] filename [/p] P Prompts for conformation before deleting each file. Examples: C:\>DEL C:\ABC\DCHS C:\>DEL A\*.* /p
UNDELETE
Attempts to restore files previously deleted with the DEL or ERASE commands. UNDELETE [drive:][path] filename Example: C:\>UNDELETE C:\ABC\*.*
TYPE
Displays the contents of a file. TYPE [drive:][path] filename Example: TYPE BOOKS.TXT Pausing the screen When you use the type command, information scrolls up the screen very quickly, press the Pause key or the Ctrl +NUM LOCK keys to suspend the display temporarily. When you are ready to see more data, press any key to continue the display. You can also use the MORE command to display one screen at a time. For Example: TYPE BOOKS.TXT |MORE
REN or RENAME
Renames a file. REN [drive:][path] filename1 filename2 Example: REN C:\ABC XYZ
MOVE
To move one or more files from one location to an other. MOVE [drive:][path] filename destination To rename a directory. MOVE [drive:][path] dir1 dir2 Example 1: MOVE C:\ABC\*.* C:\XYZ Example 2: MOVE C:\ABC C:\XYZ
PRINT
Prints text files on a printer PRINT [drive:][path] filename Example: PRINT C:\BOOKS.TXT
UNFORMAT
Attempts to restore files/directories to their condition prior to use the format command. UNFORMAT [drive:] Example: UNFORMAT A:
CHKDSK
Checks a disk and displays status report. CHKDSK drive: Example: CHKDSK A:
DISKCOPY
Copies the contents of one disk to an other. The two floppy disks must be the same type. DISKCOPY [drive1: drive2:] Example: DISKCOPY A: A:
DISKCOMP
Compares the contents of two diskettes. DISKCOMP [drive1: drive2:] Example: DISKCOMP A: A:
LABEL
Creates, changes or deletes the volume label of a disk. LABEL [drive:] Example: LABEL A: