Helping people with computers... one answer at a time.

There is as yet no Windows included application or option to print a listing of the contents of a folder or drive. I'll look at how else we can do it.

Windows 7 Starter: How can I print directories of the various USB Drives showing folders and files? My old program of PowerDesk was a beauty but not for Windows 7.

You know, after all this time I'm actually surprised that a better solution for this isn't already part of Windows. It's a common request that predates Windows 7.

As you've seen a solution is often to use some third party program to do it.

And that may still be perhaps the best solution.

But I'll also show you what you can do without any additional software in Windows.

Command Prompt: Free With Every Windows

Perhaps the quickest way to get a listing of any folder - be it on your hard disk or your external USB drive - is to use the Windows Command Prompt, available in every edition of Windows.

Typically you'll find it in the Start menu, Accessories sub-menu as Command Prompt.

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\LeoN>

As you can see when we start the command prompt it opens with C: as the "current drive", and \Users\LeoN as what's called the "current directory" or folder.

The first step is to change that to be the drive or folder whose contents you want to print. I'll use a USB drive placed in I: as my example.

C:\Users\LeoN>i:

I:\>

I typed in "i:" (without the quotes) and pressed enter. That tells the command prompt to make I: the current drive. The root folder of I:, "\" is by default the current folder.

The DIR command, for directory is used to get a listing of the files in the current folder:

I:\>DIR
 Volume in drive I is 2GB FLASH
 Volume Serial Number is E075-5E64

 Directory of I:\

01/27/2011 11:52 PM 1,208,545 IMAG0105.jpg
01/27/2011 11:52 PM 1,254,398 IMAG0106.jpg
01/27/2011 11:53 PM 1,031,069 IMAG0107.jpg
02/03/2011 03:54 PM 1,167,102 IMAG0108.jpg
02/03/2011 03:55 PM 1,286,579 IMAG0109.jpg
               5 File(s) 5,947,693 bytes
               0 Dir(s) 2,102,657,024 bytes free

I:\>

You could, of course, copy/paste that somewhere, or perhaps even use Print Screen to get an image, but there's a better way:

I:\>DIR >c:\t\directory.txt

I:\>

This time the output of the DIR command was "redirected" using the ">" operator, placing it into a file called "c:\t\directory.txt" - in otherwise a file "directory.txt" in the "\t" folder on the "c:" drive.

That's a plain text file, and thus we can open it in notepad:

Directory listing in Notepad

And of course Notepad has a File Print option.

Command Prompt and Longer Listings

In the example above I have only one folder, and only six files.

To get a longer listing we might do things just a little differently.

I:\>CD /d c:\windows\system32

c:\Windows\System32>

The CD command tells the Command Prompt to change the current directory, and the "/d" option tells it to change the current drive at the same time in a single command. We've changed to Windows' system32 folder; we'll find lots of files and folders there.

c:\Windows\System32>DIR /b /s >c:\t\directory2.txt

c:\Windows\System32>

Again the DIR command gets us our directory listing, but there are options specified: "/b" meaning "bare" - only the filename will be listed, and "/s" meaning "subdirectories" - in addition to listing the files in the folder, all subfolders and all files in the subfolders will be listed.

This is a pretty long list, so it's redirected to c:\t\directory2.txt, which we can once again open in notepad:

Long Directory Listing in Notepad

That's a list of 13,572 files, which printed to 297 pages.

The DIR command has a number of additional options for the information it displays - just type DIR /? to get a list.

Karen's Directory Printer

Not unsurprisingly there are several third-party solutions to printing the contents of folders as well. One of the most popular is Karen Kenworthy's Directory Printer.

KarenWare Directory Printer

As you can see it has a wide range of options for printing (or saving to disk) the list of files and/or folders on your USB drive or any other drive you might want to record.

And it's free.

Article C4732 - February 4, 2011 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

Recent Comments
16 Comments
Glenn P.
February 10, 2011 4:55 AM

Try it in Internet Explorer v8. :)

Sam77
February 10, 2011 7:25 AM

What surprises me most about the question is that this person can't use PowerDesk on Windows 7. As I type, I'm on a Windows 7 computer, and PowerDesk seems to work fine on my computer, including the feature to "Copy (selected file) Name(s) as Text," which can then be pasted to Word, Notepad, etc. To be sure, I tested this just before posting this comment (PowerDesk Pro, v.6),

That said though, I'm happy to read of so many other convenient solutions to this issue.

Sam77
February 11, 2011 7:54 AM

After my post yesterday, I tried Karen's "Directory Printer," and found it very "information overload." Then I found another filename program called "CopyFilename." VERY light-weight, and does what PowerDesk does: Copies the list of selected files - and only the file NAMES - as though you were copying text, then you just paste it to any document and can print from there. Very neat, clean, and simple - it works in Explorer, via the "right-click" context menu.
The website is http://www.extrabit.com/copyfilenames/
I suspect this is what most people want when they think of printing a list of filenames.

Duane Ferguson
February 11, 2011 2:09 PM

Tree Size Free gives you a comprehensive list of directories and files on any drive, and is extremely useful for locating large files devouring your hard drive space. I've used it on client servers to show that backups were failing because staff had stored entire seasons of their favorite TV show on a company server. I've also used it to tidy up our machines at home.
http://www.jam-software.com/treesize_free/

Allan
June 16, 2011 10:35 AM

Try Directory Report
http://www.file-utilities.com
It can print many file attributes in many formats