How do I list all files in a folder?

How do I list all files in a folder? cover image
  1. Home
  2. Answers
  3. How do I list all files in a folder?

I have a folder with over 200 documents (Microsoft word and Excel files). I’ve taken care to put descriptive names for all the files. I’d now like to print out this list. Is there a way to get a list of all these files along with their file types in another Microsoft Word document.
Polly West

There are two ways you can get a list of all the files in a given folder. The easier of the two methods is to install a small utility, while the second is to use MS DOS commands via the terminal window. Let us look at these two options.

Sponsored Links

Program to list all files in a folder

List files from folder in a text file using FOLDER-TO-TXTFolder-To-TXT is a free utility which creates a list of all the files in a folder. Extremely simple to use, this program enables you to either save the exported list of files as a .txt file or print it off directly! This freeware is an ideal solution for your needs.

Here is a little tip: If you want to format the list of files, save it first as a text file. Then open this .txt file in Microsoft Word, do the necessary changes and take a printout.

Directory Printer from KarenWare to list all the files in a particular folderThe Directory Printer from KarenWare.com is another program that can print the name of every file on a drive. File size, date and time information can also be included when listing the files in a folder.

File-Utilities Directory ReportFile-Utilities Directory Report is a file maintenance program with an easy-to-use interface through which you can print the list of files in a folder or save the information to a HTML, XML or text file.

Using a simple DOS command to get a list of all files in a folder

For those who want to learn something new and impress people with “geekiness”, the alternate way to get a list of all files in a folder is to use the DOS Command Prompt. This option is not for the faint hearted and does require the use of a few DOS commands (detailed below).

Start by opening the Command Prompt window; it’s listed under “Accessories“. The window will probably look like one below with a blinking cursor in front of prompt and a small message at the top.

Command Prompt - Terminal window

The prompt itself shows the folder you are working on presently. For instance, C:\Users\Manish> (as in the image below) means, I am in “Manish folder which is inside “Users folder in the C: drive. To move to the folder that has the list of the files, execute the following commands at the prompt:

cd THE-FULL-DIRECTORY-PATH
dir >folder-file-list.txt

And since you are on a learning spree, here are a few more interesting tit-bits.
The listing produced by dir in its barebones form can be changed using switches which can refine the command. For instance:

To save the listing generated by any of the above DOS commands, put the greater than sign (>) followed by the file name.
Here are some other DOS commands that you may like to know.

Answers How Do I Other Resources