DIR Command is Used to|Explain the DIR command and its various switches.

By | March 13, 2022
DIR Command is Used to|Explain the DIR command and its various switches

DIR command is used to display a list of files and sub-directories present in the directory, which is present in a storage device such as a Solid State Drive, Hard Disk Drive, External Drive such as Pen Drive, Memory Card, etc.

The usage of the DIR command with various switches are given below:

1. DIR Command is Used to without any Parameter

When the DIR command is used without any parameters it lists the name, the access date and time, the size of files. additionally, it displays, the number of files data of the list of files and directories that are present in the drive.

Syntax- C:\>DIR

dir command is used to without any parameter

2. DIR command with /W switch

When the DIR command is used with the /W switch it lists only the name of the directories wide across the screen, without the time, date, and size information. the syntax of the DIR command with /W switch is following-

Syntax- C:\>DIR /W

dir command with w Switch

3. DIR command with /P switch

When the DIR command is used with the /P switch the output of the DIR command is paused if there are more files than that can be listed o the screen at once. The syntax of DIr command with /P switch is following-

Syntax- C:\>DIR /P

dir command with p switches

FAQ: DIR Command is Used to|Explain the DIR command and its various switches.

Q1. For what purpose DIR command is used?

Ans. The purpose of the DIR command is to display a list of files and sub-directories present in the directory, which is present in a storage device such as a Solid State Drive, Hard Disk Drive, External Drive such as Pen Drive, Memory Card, etc.

Q2. DIR command example-

Ans. If you want to see a directory of any drive then follow the below steps-
1. Run CMD as administrator (if you want to see a directory of D drive then type D:)
2 Now type DIR and hit enter. Now you can see a directory of drives.

Q3. What is the DIR command in windows?

Ans. DIR command is used to display a list of files and sub-directories present in the directory, which is present in a storage device such as a Solid State Drive, Hard Disk Drive, External Drive such as Pen Drive, Memory Card, etc.

Related-

Leave a Reply

Your email address will not be published.