The listing of folder contents can be done with the dir command. This command allows you to see the available files and directories in the current directory. The dir command also shows the last modification date and time, as well as the file size.
|S.No.||Options & Description|
Let’s see some of the examples on how to use the DIR command.
The above command lists any file that ends with the .exe file extension.
The above command uses multiple filespecs to list any files ending with .txt and .doc in one command.
Lists only the directories in the current directory. If you need to move into one of the directories listed use the cd command.
Lists the files in the directory that you are in and all sub directories after that directory. If you are at root "C:\>", type this command, this will list to you every file and directory on the C: drive of the computer.
If the directory has lots of files and you cannot read all the files as they scroll by, you can use the above command and it displays all files one page at a time.
If you don't need file information you can use the above command to list only the files and directories going horizontally, taking as little space as needed.
The above command will list all the files and directories in the current directory and the sub directories, in wide format and one page at a time.
Batch Script Tutorial
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.