Thursday, September 25, 2014

Command Prompt How to list all files in a folder as well as sub-folders in windows


Step 1 : Goto required folder in Command prompt.

Step 2: Type the following command    dir /b /s 

              /b - User bare format
              /s - Lists the files in the directory that you are in and all sub directories after that directory

              Step 2 will list all the files reside in the parent folder and it's sub folder.

Step 3: To get the specific file give the appropriate file extension. for example if we need sql file to be listed, give the following command dir /b /s *.sql | sort


Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.