Creating a Text File Listing Documents in a Directory Folder for Windows XP or Vista Command Line Instructions

Technology

Summary. Sometimes it is helpful to have a printed listing of files and documents in a directory/folder. The instructions below will assist with this process for users of Windows XP or Vista.

  1. For Windows XP, from the Start menu, click on the Run… option. For Windows Vista, from the Start menu (colorful marble) choose All Programs, then Accessories, then click Run.
  2. Type “cmd” (without quotes) next to Open: then click the OK button.
  3. A command line window will open up and display text concluding with something like C:\Documents and Settings\YourName>_
    or C:\users\yourname (for Windows Vista).
  4. The blinking cursor is where you can type commands followed by pressing the enter/return key. To list the contents of the current directory location, type dir then press the enter/return key.
  5. To change to another folder, such as My Documents, type cd my documents and then press the enter/return key.
  6. To go up one level, type cd .. and then press the enter/return key.
  7. You can always type dir and press the enter/return key to see a listing of the current files which will indicate what folder you are currently in.
  8. Return to step #3 above if you want to list and view the contents of the current directory folder, or continue to step #8 to create a printable file listing the directory folder contents.
  9. Once you have navigated to the desired directory folder, type dir > filelist.txt and press the enter/return key. This will create a text file in the current directory that contains a listing of the files in the current directory. This text file can be opened for viewing, copied and pasted to an email, and/or printed. You can use a different file name other than filelist.txt, but this one should work fine.

By Greg Johnson

Greg Johnson is a freelance writer in Iowa City and also the founder and Director of the ResourcesForLife.com website. He also manages IowaCityWebDesignArtist.com and many other topic specific websites. Learn more at AboutGregJohnson.com