Print List of Contents of a Folder

Sometimes it can be useful to print out a list of a folder’s contents.  The best way to do this on windows, in my opinion, is to use the commandline.  To open the prompt, hit Windows + R, and then type cmd into the prompt before hitting enter.  Afterwards, a screen should pop up that looks similar to this:

Cmd Prompt

Cmd Prompt

The basics you need to know are the dir, chdir, and help commands.  The  dir command outputs your current location and also the contents of the folder your in.  The chdir command lets you change your folder location.  However, to switch to another drive just type the drive letter followed by a colon.  For instance, to switch to the C drive type C:, and then hit enter.  For help with more options for dir and chdir just type help dir or help chdir.

Print Folder Contents Using Windows

  1. Hit the keys Windows + R.
  2. Type cmd into the run prompt and then hit enter.
  3. Use the chdir command to get the folder you wish.
  4. Run the command dir /b > list.txt to get a list of all the contents in the folder.
  5. Print the file list.txt.

Print Folder Contents Using Linux

  1. Open up a terminal.
  2. Use cd to get to the folder you want the list of contents from.
  3. Run the command ls -a > list.txt.
  4. Print the file list.txt.

1 Response to “Print List of Contents of a Folder”


  1. 1 binaryman July 1, 2011 at 5:51 PM

    To Print List File of a Directory
    I use Directory Report
    http://www.file-utilities.com
    It can print more attributes than DOS
    and it can save in many formats


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s





Follow

Get every new post delivered to your Inbox.