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

SrCommandDescription
1DateSyntax of this command is “C:\>date”. This command is used to check and change the current date on MS-DOS screen.
2TimeSyntax of this command is “C:\>time”. This command is used to check and change the time of computer.
3Clear ScreenSyntax 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.
4VersionSyntax of this command is “C:\>ver”. This command is used to check the version number of MS-DOS.
5CopySyntax 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.
6DirectorySyntax of this command is “C:\>dir”. This command is used to enlist all the files present in a directory or drive or folder.
7Dir/PSyntax 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.
8Dir/WSyntax 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.
9Dir/LSyntax 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.
10Dir *.*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.
11RenameSyntax 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.
12DeleteSyntax of this command is “C:\>del [path and filename]”. This command is used to delete a file from a directory or a folder.
13Make DirectorySyntax of this command is “C:\>MD [new directory name]”. This command is used to create a new directory or folder in a drive.
14Change DirectorySyntax of this command is “C:\>cd [path]”. This command is used to change the current directory to the desired directory.
15CD..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.
16CD\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.
17TreeSyntax 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.
18AttributeSyntax 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.
19Hide FilesSyntax 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.
20Show hidden filesSyntax 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.
21Disk CheckingSyntax 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.
22MoveSyntax 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.
23SortSyntax 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.
24File ComparisonSyntax 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.
25DefragmentationSyntax 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.
26DelTreeSyntax 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.
27Remove DirectorySyntax 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.
28PingSyntax 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.
29Format DiskSyntax 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.
30Close DOSSyntax 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.