Important MS-DOS Commands, Top 30 Commands

Important MS-DOS Commands, Top 30 Commands

In this tutorial, we will learn about the Important MS-DOS Commands, Top 30 Commands.

Each command is mentioned in the table below with a detailed description and purpose of the command.

Important MS-DOS Commands, Top 30 Commands with Description

Sr Command Description
1 Date Syntax of this command is “C:\>date”. This command is used to check and change the current date on MS-DOS screen.
2 Time Syntax of this command is “C:\>time”. This command is used to check and change the time of computer.
3 Clear Screen Syntax of this command is “C:\>cls”. This command is used to clear all the contents showing on the screen and after pressing enter the screen becomes blank.
4 Version Syntax of this command is “C:\>ver”. This command is used to check the version number of MS-DOS.
5 Copy Syntax of this command is “C:\>copy [desired file name and address] [destination address]”. This command is used to copy a file from a drive to another drive.
6 Directory Syntax of this command is “C:\>dir”. This command is used to enlist all the files present in a directory or drive or folder.
7 Dir/P Syntax of this command is “C:\>dir/p”. This command is a switch of dir command. This command is used to enlist the file through page-wise sorting.
8 Dir/W Syntax of this command is “C:\>dir/w”. This command is a switch of dir command. This command is used to enlist the files and folders through width-wise sorting which hides the time and size etc.
9 Dir/L Syntax of this command is “C:\>dir/l”. This command is a switch of dir command. This command is used to display the files with lower case alphabets.
10 Dir *.* Syntax of this command is “C:\>dir *.*”. This command is a search engine of dir command. This command is used to display all the files and folders with all the attributes and types etc on the screen. This command is also used to search the files of own desire, attribute and name. Its a kind of a filter which can be applied to search a file in a drive or a directory.
11 Rename Syntax of this command is “C:\>ren [old file name] [new file name]”. This command is used to rename a file. Simply out the old name of the file and new name of the file and press enter. Your file name will be renamed.
12 Delete Syntax of this command is “C:\>del [path and filename]”. This command is used to delete a file from a directory or a folder.
13 Make Directory Syntax of this command is “C:\>MD [new directory name]”. This command is used to create a new directory or folder in a drive.
14 Change Directory Syntax of this command is “C:\>cd [path]”. This command is used to change the current directory to the desired directory.
15 CD.. Syntax of this command is “C:\>cd..”. This command is used to change the directory to the previous opened folder. Simply you can go back to the last folder of the opened directory.
16 CD\ Syntax of this command is “C:\>cd\”. This command is used to go to the base root place of the drive. If you’re working in a drive-in subfolder and want to go to the start of the drive then this command is used.
17 Tree Syntax of this command is “C:\>tree [path]”. This command is used to display the consisting files and folders in the form of a tree. The files and folders are displayed with lines which help to differentiate between the directories and the subdirectories.
18 Attribute Syntax of this command is “C:\>attrib”. This command is used to check the details of the extensions of the files present in a directory or a folder. The attributes of a file are very important to differentiate between two different files.
19 Hide Files Syntax of this command is “C:\>attrib +h”. This command is used to hide the files you want to be unseen. The files will be hidden as per required. You can use wildcard *.* to hide all the present files in the folder.
20 Show hidden files Syntax of this command is “C:\>attrib -h”. This command is used to show the hidden files present in the directory. You can use wildcard *.* to show all the hidden files present in the folder.
21 Disk Checking Syntax of this command is “C:\>chkdsk [drive:]”. This command is used to check the compatibility of a drive. The system checks the bad sectors and the stuff needed to be cleared to make the disk reliable.
22 Move Syntax of this command is “C:\>move [path and filename] [destination path]”. This command is used to move the files from one directory to another. This command is useful when you want to move the files permanently to another folder.
23 Sort Syntax of this command is “C:\>sort [arrangement]”. This command is used to display and set the files and folders as by name, by size, by extension, by date modified, by date created etc.
24 File Comparison Syntax of this command is “C:\>fc [first file] [second file]”. This command is used to compare between two same files. This command helps the user to choose the best file to work on and it also shows the previous modified details of the files.
25 Defragmentation Syntax of this command is “C:\>defrag [drive:]”. This command is used to defragment the desired drive. Defragmentation is the way to check out the unnecessary files and folders and the raw data and unneeded cache memories. It help the system to make some space in the drive.
26 DelTree Syntax of this command is “C:\>deltree [path]”. This command is used to delete all the files and subfolders present in a folder or a directory. It permanently deletes all the files and folders present and all the stored data of that directory.
27 Remove Directory Syntax of this command is “C:\>rd [path]”. This command is used to remove the directory and its memory. All the files and folders present in that directory will be deleted but can be gain back by using redo directory option.
28 Ping Syntax of this command is “C:\>ping [IP address]”. This command is used to check the availability of a host and guest under the same gateway. This command shows the data packets sent, received and lost by the host and the guest.
29 Format Disk Syntax of this command is “C:\>format [drive:]”. This command is used to remove and delete everything present in a drive. This command removes the files and folders and all the data present in the directory. That’s why this is a very dangerous command that it permanently deletes all the data present in the drive and the deleted data can be restored back.
30 Close DOS Syntax of this command is “C:\>exit”. This command is used to close MS-DOS. By using this command the user gets back to the graphical user interface from command line interface.