MKDIR:
Creates a directory.
Syntax: MKDIR [drive] path.
e.g.:
C:\>MKDIR Test :-Creates test directory in C drive.
C:\>MKDIR\BBA\lab1 :-Creates subdirectory lab1 in the directory BBA in C drive.
DIR/W/P/S
DIR: Displays a list of files and subdirectories in a directory.
Syntax: DIR [drive:] [path] [filename] [/A: [Attributes]] [/B] [/C] [/L]
[/O: [order]][/S] [/P] [/W] [/Q]
[Drive:] [Path] [Filename]: drive, directory and files to display.
/P: Pause after each screenful information.
/W: display the list of files in a wide formal.
/S: displays files in specified directory and sub directories.
e.g.
C:\>DIR D: /Test/W/P/S
VER
It is internal command. Display the Ms. Dos version in use.
Syntax: VER
E.g. C :\> VER
Edit:
—External Command
–it is used to compile, edit, save, copy and print straightforward and simple text.
Syntax: EDIT [drive] [path] filename
E.g. C:\>Edit CONFIG. SYS
Scandisk
–External Command
–It repairs the disks. It checks the surface of disks.
Syntax: scandisk [drive:] [/ALL] [/CHECKONLY] [/AUTOFIX] [/NOSAVE] [/SURFACE]
E.g.
C:\>SCANDISK
To check and repair the disk at current drive.
C:\>FORMAT D:/S
Format D: drive for use with MS-DOS and copies the system files on the formatted disk
C:\>DIR A: /W/P
DIR: Displays a list of files and sub directories in A: directory
/P: pause after each screenful information
/W: display the list of files in a wide format
C:\>INFO\BBA>COPY*.DOC A:
Copy all the files with .doc extension inside the directory BBA in C:\INFO TO A: drive
C:\ATTRIB +R*.BAT
Set the attributes of files with .bat extension in c: drive to read only.
C:\DATE
Display the current date and allow changing the date.
Attrib:
Attrib refers to the current attributes of file/files.
Syntax: ATTRIB [+R] [-R] [+A] [-A] [+s] [-s] [+H] [-H] [drive] [path] filename [/S].
+ Set an attribute
— Clear an attribute
R Read-Only
A Archive
S System file
H Hidden
E.g. C :\> ATTRIB+R GOVIND.DOC
Changes the GOVIND>DOC file attribute to read only.
Disk Copy:
Copies the contents of one floppy disk to another.
Syntax: DISKCOPY [drive:] [drive 2:] [/V]
/V verifies that the information is copied correctly.
MD (Make Directory) :
We use this commands to make a new directory or sub directory.
Syntax : c\:>md directory name
Example : md student
CD (Change Directory) :
This commands is used to move from one directory to another.
Syntax : C:\> CD Directory name
Example : > CD Student
Exit to Directory :
CD… The command move the sub-directory to parent directory.
CD\ The command is used to move directly to the root directory.
RD (Remove Directory) : If a Directory which was earlier is ;not required than such directory can be removed by using
Syntax : C:\> RD Directory name
Example : >RD student
Note : (a) The directory, which is to be removed, must be empty.
(b) The directory in which one is working cannot be removed.
One has to close the directory and come to the parent directory to remove that directory.
Copy Con : Its command is used to create a file. The name of the file, which is to be created, is written after the copy Con leaving one space in between
Syntax : Copy Con file name
To created a file, the following steps are :
(i) Type Copy Con Monu and press Enter.
(ii) Type whatever is to be typed in the file.
(iii) Press F6 function key or CTRL + Z keys ‘?Z’ will be displayed on the screen, which indicates that the file is complete.
(iv) Press Enter and after that the DOS will save the file and will display the message ‘1 File(s) copied.
Del : This command is used to erase the files which are no longer required.
Syntax : C:\> Del < File name >
Example : >Del Moni
Type : This command is used to view the contents of text file.
Syntax : Type
Copy : This command is used to copy of file from one place to another place. A copy of file is another file with the same contents.
Syntax : c:\> copy
Ren : This command is used to rename the file. In REN command two parameters are used. The first is the file we want to rename and the second is the new name for the file.
Syntax : > REN
DIR : This command is used to display of directory and files.
Syntax : c:\> dir ?
CLS : This command is used to clear the screen.
Syntax : c:\> cls