List of All DOS Command
List of All DOS Command
1) Date Command
This command is used to change or/and display current system date.
C:\>DATE /t
Sun 03/04/2012
C:\>DATE
The current date is: Sun 03/04/2012
Enter the new date: (mm-dd-yy) 04-05-2013
2) TIME Command
This command is used to change or/and display current system time.
C:\>TIME /t
02:48 AM
C:\>TIME
The current time is: 2:48:47.32
Enter the new time: 06:10:00
3) VER Command
This command is used to display the window's version.
C:\>ver
Microsoft Windows [Version 6.1.7600]
4) VOL Command
This command is used to display the disk volume level or serial number.
C:\>vol d:
Volume in drive D is SOFTWARE
Volume Serial Number is 147C-DA89
5) LABEL Command
This command is used to create, update and delete the serial number of particular disk.
C:\>LABEL D:
Volume in drive D: is SOFTWARE
Volume Serial Number is 147C-DA89
Volume label (32 characters, ENTER for none)? IMP_DOCUMENTS
6) ECHO Command
This command is used to display message on command screen, and also turn on/off command-
echoing.
Command syntax is :
C:\> ECHO [ON|OFF]
C:\> ECHO [MESSAGE]
C:\>ECHO "https://www.includehelp.com"
"https://www.includehelp.com"
C:\>ECHO OFF
DATE/T
Sun 03/04/2012
ECHO ON
C:\>
7) PROMPT Command
This command is used to change the command prompt.
Switches:
$A - & (Ampersand)
$B - | (pipe)
$C - ( (Left parenthesis)
$D - Current date
$E - Escape code (ASCII code 27)
$F - ) (Right parenthesis)
$G - > (greater-than sign)
$H - Backspace (erases previous character)
$L - < (less-than sign)
$N - Current drive
$P - Current drive and path
$Q - = (equal sign)
$S - (space)
$T - Current time
$$ - $ dollar sign
C:\>prompt "includehelp.com"
"includehelp.com"DATE/t
Sun 03/04/2012
"includehelp.com"PROMPT $p$g
C:\>
8) TITLE Command
This command is used to change the title of MS DOS screen.
C:\>TITLE includehelp.com
9) MKDIR/MD Command
MKDIR/MD command is used to create directory in particular drive.
Command syntax is :
C:\> MKDIR [drive]:\[Directory_Name]
C:\> MKDIR [Directory_Name]
* If you do not enter path [drive or directory],
directory will make in current working drive/directory.
1. C:\>MKDIR D:\Tutorial
2. C:\>MKDIR Tutorial
3. C:\>MKDIR D:\Folder1\Folder2\Folder3
Explanation
Command syntax is :
C:\> CHDIR [drive]:\[Directory_Name]
C:\> CHDIR [Directory_Name]
Command syntax is :
[Current_working_drive\direcotries..\> CD..
[Current_working_drive\direcotries..\> CD\
1. C:\>d:
2. d:\>cd tutorial
3. d:\Tutorial>cd..
4. d:\>cd folder1\folder2\folder3
5. d:\Folder1\Folder2\Folder3>cd\
6. d:\>cd folder1\folder2
7. d:\Folder1\Folder2>cd\
8. d:\>
Explanation
Command syntax is :
C:\>COPY CON [file_name]
Your text will goes here....
^Z (CTRL+Z) OR F6 .. (to save file)
Command syntax is :
C:\> TYPE [FILE_PATH]
C:\>TYPE about_us.txt
includehelp.com provides online tutorials .
C:\>
Command syntax is :
Explanation
Switches
D : Directories only.
/L Uses lowercase.
/N New long list format where filenames are on the far right.
N: Name wise.
D: Date wise.
timefield C Creation,
A Last Access,
W Last Written
Command syntax is :
DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L]...
1) C:\> DIR D:
C:\> DIR/AD D:
C:\> DIR/A-D D:
C:\> DIR/AH D:
3) C:\> DIR/A-D/AR D:
Command syntax is :
C:\>TREE/[SWITCH] [DRIVE:]\[DIRECTORY]
C:\>TREE D:\test
D:\TEST
├───folder1
├───folder2
│ └───SubFolder1
│ ├───SubFolderA
│ └───SubFolderB
└───folder3
C:\>
C:\>TREE/F D:\test
Folder PATH listing for volume iHelp's Personal Data
Volume serial number is 00000002 147C:DA89
D:\TEST
│ file1.txt
│ file2.txt
│
├───folder1
├───folder2
│ │ file-A.txt
│ │ file-B.txt
│ │
│ └───SubFolder1
│ │ t.txt
│ │
│ ├───SubFolderA
│ └───SubFolderB
└───folder3
C:\>
Command syntax is :
C:\> Del [/Switch] [File Path]
C:\>ERASE/P D:\includehelp.txt
D:\includehelp.txt, Delete (Y/N)? y
Explanation : above command will delete includehelp.txt file from D:\ drive, with confirmation
message "D:\includehelp.txt, Delete (Y/N) ? " Press Y to delete..
Explanation
Command syntax is :
C:\> RD [/Switch] [Path]
/S : Removes all directories and files in the specified directory in addition to the directory
itself. Used to remove a directory tree.
/Q : Quiet mode, do not ask if ok to remove a directory tree with /S.
1. C:\>TREE d:\examples
2. Folder PATH listing for volume Mike's Personal Data
3. Volume serial number is 00000002 147C:DA89
4. D:\EXAMPLES
5. ├───include
6. │ └───Debug
7. └───loop_Ex
8. C:\>RD/S d:\examples
9. d:\examples, Are you sure (Y/N)? y
10. C:\>
Explanation
Switches
/S Shuts down the window. /F Forcely shut down the window. /C Display dialog with comment
and then shutdown. /T Shutdown time in XX seconds. /A Abort the shutdown command. /I To
displai GUI window for remote shutdown.
1) C:\> SHUTDOWN -S
2) C:\> SHUTDOWN -F
3) C:\> SHUTDOWN -S -C "Windows is shutting down due to virus.."
4) C:\> SHUTDOWN -S -T 30
5) C:\> SHUTDOWN -A
6) C:\> SHUTDOWN -I