Recently, I had to ship a friend a list of all the files and folders in a particular directory on my computer and it took me some time to figure out the best fashion to go well-nigh information technology. Later playing around with various methods, I was able to create a nice looking Excel spreadsheet with all the data on the files and folders plus additional info like the size of files, last modified date, etc.

In this article I'm going to mention the two principal ways to generate a directory list: using the command line or using a third-party plan. If your needs are very uncomplicated, the command line method is the easiest and doesn't require any boosted tools. If you need a more fancy study, then check out the freeware utilities.

Command Line

And so allow's start with the command line method offset since it's piece of cake and will probably exist enough for xc% of the people reading this article. To become started, open Explorer and browse to the folder directory above the folder that you want to get the directory listing for.

If yous want to impress out the file and binder list for C:\Test\MyTestFolder, so navigate to C:\Test, press the SHIFT cardinal and so right-click on the MyTestFolder. Get ahead and select Open control window hither from the menu.

open command window

At the command prompt, you take to type a very unproblematic control:

dir >filename.txt

The dir control generates a list of files and folders in the electric current directory and the right angle bracket says that the output should be sent to a file rather than onto the screen. The file will be created in the current binder and if you open it using Notepad, it'll look similar this:

print directory listing

By default, the control volition give y'all the concluding modified appointment/fourth dimension, the size of the files, the listing of directories and the actual file names. If you lot desire different data, you can add together parameters to the command.

For instance, if you don't want all that actress information, you lot can print just the names of the files and folders using the following command:

dir /b >filename.txt

In the above examples, yous'll discover there is a folder chosen Word Stuff, just the output doesn't listing whatever of the files inside that directory. If yous want to go a list of all files and folders including subdirectories of the current directory, and so y'all would use this control:

dir /b /s >filename.txt

Note that you tin also get rid of /b if you want the full directory and subdirectory listing with the extra data on size, etc. Hither is the output of dir /s >filename.txt below.

list of files

The dir command has a bunch of other control line parameters which I won't mention hither, but you lot can check out a full listing of them on Microsoft's website. Using the actress parameters, you can as well prove file attributes (hidden, compressed, etc), bear witness file buying and more. You lot can then import the data into Excel and choose tab-delimited so that the data volition be separated into private columns rather than being bunched into one.

3rd-Political party Freeware

Directory List & Impress

One of the best utilities for press directory listings is Directory Listing & Print. When y'all download information technology, you'll detect that some of the features are disabled. That's considering the gratis version doesn't include all the options that are included in the Pro version. To unlock everything, you'll accept to pay $xx.

Even so, unless you actually need to print out directory listings on a daily basis, the free version will exist more than than enough for just near anybody. Once you lot install information technology, you have to first choose the directory that you want to print out. You lot tin can also choose from a listing of favorites on the correct hand side.

directory list print

Note that at this point, you should run across the output previewed in the lesser text window of the plan. I really like this considering you tin can play around with the different options and encounter the results updated instantly. Now click on the second tab named Selection.

select files

By default, Provide subdirectories and Provide files are checked. This means it'll print out the list of files in the current directory and volition include whatever folders likewise in the current directory. It will not list out the files that are in subdirectories. If y'all want to do that, you accept to check the Run through subdirectories box at the bottom.

As you can see, you can include the cosmos date, modified appointment, file size, path, etc in the free version, but if you desire file owner, file attributes, etc, yous'll demand to unlock the software. In the example beneath, I checked Show file size and Run through subdirectories to get this output:

directory listing

I'yard going to skip the third tab (Filter) because it'south completely disabled in the free version. The paid version has some pretty advanced filtering options, but really only needed if you have thousands or millions of files. On the Output tab, y'all can cull where y'all want to export the listing out to.

output listing

You lot can print it, copy to clipboard, or export out to Discussion and Excel. To exist abrasive, they disabled copy to Notepad and export to file in the costless version. The Action tab is also completely disabled and then won't get into it here. Overall, the gratis version of the program does a groovy task and more than plenty to become a complete and thorough listing of a directory.

Karen'south Directory Printer

Karen's Directory Printer is pretty onetime (2009), only nevertheless does a smashing chore of exporting out directory listings. Information technology doesn't take as many options as Directory List & Print Pro, only compared to the free version, it'south quite close.

karen directory printer

Y'all take to choice from the Print tab or the Save to Disk tab first. Both are exactly the same, one merely prints to a printer and the other saves the output to disk. Probably didn't need two separate tabs for that, merely it's an quondam program.

Pick your folder and choose whether you lot want to print file names just, folder names merely, or both. You tin also tell information technology to search sub folders and print them out besides. In addition, you can include or exclude system, hidden and read-only files.

Clicking on the Show Network checkbox will permit y'all to meet all network drives and shares and print out their structures besides! This is great for office networks that have folder shares on servers.

You lot can also sort by file name, file extension, file size, date created, date modified and more than. Y'all tin also put a file filter so that only certain types of files are printed, such as images merely, sound files, executables, documents, etc.

print directory list

Finally, you can choose from a large number of attributes that you want to include in your file print listing. By default, it has a couple of items checked that I don't care nigh similar attributes, date last accessed, etc. Just uncheck them and brand sure to click on the Folder Info tab and do the same there.

file info

When saving the file to deejay, the program inserts a agglomeration of useless comments, which tin can thankfully be removed by checking the Omit Comment Lines box. Yous tin can too go rid of the column that shows whether the row is a file or folder by checking the 2nd box.

omit comments output

Finally, one other great characteristic of the program is that it adds an option to your Explorer context menu so that you lot tin can merely right-click on any folder and cull "Print with DirPrn".

print with dirprn

There really isn't much else to the software than what I accept shown above. Information technology runs fine on Windows seven and Windows viii, so that'due south peachy.

Then those are all the dissimilar ways you can generate a directory listing for costless with as much or as trivial data as needed. If you accept any questions, mail service a comment. Relish!