In this article, I’m going to mention the two main ways to generate a directory listing: using the command line or using a third-party program. If your needs are very simple, the command line method is the easiest and doesn’t require any additional tools. If you need a more fancy report, then check out the freeware utilities.

Command Line

To get the directory listing for a specific folder, use the following command: dirname “C:\Users\username\AppData\Roaming\Microsoft\Windows\CurrentVersion”

If you want to print out the file and folder listing for C:\Test\MyTestFolder, then navigate to C:\Test, right-click on the MyTestFolder, and select Open command window here.

netstat -an This command will show you all the active network connections on your computer.

dir /a “file.txt” dir /a “file.txt” dir /a “file.txt” The dir command will create a file called “file.txt” in the current directory and if you open it using Notepad, it’ll look like this:

To get more information about a file, you can use the command: file -l ..

grep -i ‘^.txt$’ *.txt This will print out all the files and folders in the current directory that contain text.

wc -l wordstuff

This command will create a text file called filename.txt in the current directory. ..

dir /s >filename.txt

The dir command has a lot of other command line parameters which I won’t mention here, but you can check out a full list of them on Microsoft’s website. By using the extra parameters, you can also show file attributes (hidden, compressed, etc), show file ownership and more. You can then import the data into Excel and choose tab-delimited so that the data will be separated into individual columns rather than being bunched into one.

Third-Party Freeware

Directory List & Print

Directory List & Print is a great utility for printing directory listings. The free version doesn’t have all the features of the pro version, which costs $20. ..

The free version of DirectoryMate is a great way to print out directory listings on a daily basis. You can also choose from a list of favorites on the right hand side.

The second tab of the program lets you select different types of text to be highlighted. For example, you can choose to highlight all the text that is either a number or a word that is at least three letters long. ..

If you want to include files in subdirectories, you have to check the Run through subdirectories box at the bottom.

The software offers a free version that includes the creation date, modified date, and file size, but if you want file owner, file attributes, or other information you’ll need to purchase a license. In the example below I checked Show file size and Run through subdirectories to get this output: ..

I’m going to export the listing to a specific folder on my computer.

The directory listing in the free version of DirectoryMate is adequate, but it is not as comprehensive as the list in the paid version.

Karen’s Directory Printer

Directory List & Print Pro is a free program that does a better job of exporting out directory listings than Karen’s Directory Printer.

You have to choose one of the Print or Save to Disk tabs to print from. The tabs are exactly the same, one just prints and the other saves. Probably didn’t need two separate tabs for that, but it’s an old program.

To print files and folders:

  1. Open File Explorer.
  2. In the left pane, click on the folder you want to work with.
  3. In the right pane, click on the File tab (or press Ctrl+F).
  4. Under Print, select either Files only or Folders only.
  5. If you want to include system files, hidden files and read-only files, check Include these items also.
  6. Click OK to close the Print window. ..

If you check the “Show network drives and shares” box, you’ll be able to see all of your network drives and shares, as well as their file structures. This is great for office networks that have folder shares on servers. ..

You can sort by file name, file extension, file size, date created, date modified and more. You can also put a file filter so that only certain types of files are printed.

To customize your print list, first click on the File tab and then click Print. In the Print dialog box, on the Page Setup tab, under Attributes, uncheck the boxes next to the attributes you don’t want included in your print list. Then click OK. On the Folder Info tab, under Attributes, make sure that all of the boxes are checked. ..

When saving the file to disk, the program inserts a bunch of useless comments, which can thankfully be removed by checking the Omit COMMENT Lines box. You can also get rid of the column that shows whether the row is a file or folder by checking the second box.

DirPrn is a great program that adds an option to your Explorer context menu so that you can easily print files from within the folder. ..

The software is great and can be used on both Windows 7 and Windows 8.

This is a guide on how to generate a directory listing for free with as little information as needed. If you have any questions, please post a comment. Enjoy!