locked
Printing Directory listing RRS feed

  • Question

  •  

    Being able to print a listing of a directory's contents is handy, especially when preparing technical documentation. But Windows lacks this functionality. Leave it to good ol' DOS and the DIR command to save the day.

     

    Explorer does not support the printing of a directory listing directly but there is a simple way around this.

    Startup a command prompt and change to the directory you want to print the listing of. Type the following command.

    dir > print.txt

    This will perform a directory listing command and redirect the contents of the command to a file called print.txt. The you can open up the file in your favourite text editor and click file print.

    notepad print.txt

    When your print is complete just remove the file.

    del print.txt
    * please not u can use all the parameters with dir command before the '>'
    Thursday, September 27, 2007 12:34 AM

All replies


  • how to do in linux..??
    Thursday, September 27, 2007 6:11 AM

  • wow..gr8...never thought abt it..
    Thursday, September 27, 2007 10:49 AM
  • ls

    ls [options] [names]

    List contents of directories. If no names are given, list the files in the current directory. With one or more names, list files contained in a directory name or that match a file name. names can include filename metacharacters. The options let you display a variety of information in different formats. The most useful options include -F, -R, -l, and -s. Some options don't make sense together (e.g., -u and -c).

     

    Thursday, September 27, 2007 1:19 PM