How to get all files and folders name into a text file ? Readers Question
One of the visitor , Garry contacted me asking a simple but very nice question.
Garry : How do I get all the folders and files names (in my C drive) into a text file. I do it manually but its very tiring. I need a quick solution . Any Idea ?
Hi Garry, Thanks for the mail and here is your answer.
He told that he is using windows . I had a very quick and easy solution for this. Here are the steps:
- Open the run dialog box by hitting WIN KEY + R
- Type CMD and enter. This opens the dos window.
- Now type cd c:\ . This way you will move to C directory ( where all your files are present)
- Now Type dir /b > alldata.txt .
- Open the alldata.txt file which is in your C: drive and you will be able to see all data.
Here is the image with a brief explanation of how it works at the end.

Brief explanation :
DIR gives you list of all files and folders ( except hidden ) . /B is an option for DIR so that you just get the list of files and no other details. . > Is a way where the out put of DIR is given into another , which here in our case is a file “alldata.txt”
Posted on 13th December 2007 by Ashish Mohta , A Professional Tech blogger, Editor and Writer who talks about solving day to day problems of people who use computer. He also writes on How to use the applications like Office, PC tips, Online tools,Browsers and more. All posts by Ashish Mohta | Connect with me @ Twitter | Linkedin | Facebook | Stumble



Sign up for our daily email newsletter
Thanks much for the tip.
Leave your response!