Export list of files in a folder and subfolders from windows explorer

I have been trying to get a list of all the backup files present on a particular drive; Here is how I acheived this.

Go start —> run —>cmd

this opens a command prompt window

Browse to the folder you need to get a list of files and subfolders from

c:> cd test


type in the below command to list all the subfolders and files of the directory you are in and export the results to text.txt file.

c:\test> dir /s >text.txt

If you do not need the details of heading information or summary use /b option.

c:\test> dir /s /b >text.txt

This entry was posted in Tricks, Windows and tagged , . Bookmark the permalink.

Leave a Reply