We have several files and folders in our computers. Sometimes we may require a list of files and folders in a particular directory. Looking for each file and folder and listing them isn’t easy. But there’s an easy way to generate or create a list of files and folders in a location. Here’s how you do it:
Go to Start> Accessories> Notepad

Now type the following:
dir /s > output.txt
Save the file as “genfile.bat”, close Notepad.

Now to generate a files and folder list of a specific location, simply paste genfile.bat into it and double click on it. It will create a new text file in same place with the name “output” which will contain the list of all the files and folders present in the location. It not only shows the names of files and folders but it also shows the date on which they were created, their file size, etc.

Neat!
I’ve been trying to figure out a way to do this for so long I was beginning to think it would be quicker to just type up a list myself. Thanks for saving me so much time!
Best.Tip.Ever.
awesome.
Really great! Just what I needed. I modified it slightly to list only files with a certain extension. Thought I’d share.
Like so:
dir /s *.html > html_list.txt
Wow it’s nice tip
Thank
Whoa!! Great tip!! I was searching around for a program or something which can do this! Nice!
Is there a way to only list folder names only? I’d like to list the programs I’ve installed on my computer before I re-format.
Thanks again!
“save as *.csv”
to save the generated text file as a comma seperated value file (*.csv) for use in excel and word simply open with text editor (notepad, wordpad, etc.) and “Save as”, and select “all file types”, (use ANSI format if option is shown), and rename as a *.csv file. Open a spreadsheet program (MS Excel, Open Office, etc.) select “Data” and “Import External Data”, then select this csv file. As part of the process you can decide which lines to import and which to skip. Males larger files much easier to sort and saves a lot of cutting and pasting.
This is still little complicated to copy genfile.bat, open output.txt and delete it at end.
Try wList for creating file lists:
http://www.sharktime.com/us_wList.html
For me, it is the best solution ever.
T.
i really like the information provided but if you are looking at just a list of folders names that are in a directory you can creat the bat file with this
dir /a:d /b > folderList.csv
a=archivable files
:d directories only
b=bare names only
hari om.
thanks for the help.I have some thousand of books in directories containing tif image of each page.When I wanted to download newer ones i want not to download copies. So I needed a list.
dhanyawAd.
great tip saved me alot of typing. thanks
thanks for the help guys, is there a way of listing just the folders and subfolders?
cheers!
Thanks for this, its a really great solution to a problem that I have been pondering over fos some time!!!
James
You’re welcome James
Thanks for sharing this very helpful tip. It will definitely come in handy.
Greatest tip ever
I have finally found a “batch” that comes close to what I want to do. I have thousands of mp3 files in different folders by artist name. All I want to do is to make a list from the folders of all the files in the folders into one file and with NOT all the info (date, size, time, Dir of, , etc) Is that possible?
Excellent. Thanks
Wow!! That took all of 1 minute to create a list. THANK YOU!!!
You’re welcome
Thanks that was wonderful, I have been playing with it and driving my son nuts……1
I am using the tool FileList Creator (freeware and portable) for creating lists of folders and files:
http://www.sttmedia.com/filelistcreator
With this tool you create such a list in a view seconds and you can set lots of other things like user-defined columns or grouping. The export is available as image, text file or HTML.
Thank you so much! This will help me to organize my files and reduce the time I need to do make my reports! Great! : ) Thanks for sharing!