How to get a directory listing using batch files

I know there are programs that do the job much better but I like it the dirty way: batch files.
It’s fast, no installation required and does what I want. Enough talk, here is the code:

@dir %1 /w /b /o:gn > "_listing.txt"

Copy the code to a text file and change its extension to .bat
/b – bare format, remove this for detailed info
/o:gn > “_listing.txt” – sends the output to “_listing.txt”

For further customization, type dir /? on a command prompt.

One comment

  1. Emil says:

    this is really cool.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Yes! An update! »
« Mozilla Firebird, a great IE alternative