How to export directory listing to text file

I did this a coupl of times and every time i had to look or the information on the web so this time i sortof thought to document it for reference and many others might find it usefull too.

It comes in handy when large list of files with their paths has to be created. As one can not type in the paths for say a directory containing 1000 or so images but to really need to do that for some data base or a gallary.

To do this we just need to type in a single lin in command promt and all s done…

1) Open the command line (cmd.exe in NT/2000/XP)
2) Navigate to the required directory using the cd command.
3) type dir /b>filelist.txt

A file called filelist.txt will be created with the directory contents. If you want to create the file list elsewhere, use a fully qualified file name or use the ..\ convention. Don’t forget that Windows uses \ not / as directory delimiters.

Advertisements

Author: MtaraM

Solution designer with Firstsource solutions. An MBA grad in Networks and IT Infrastructure. Technology enthusiast, blogger, webdesigner, Network security aspirant and in love with electronics and gadgets a Household Hacker and Audiophile who loves to share thoughts about almost anything @Mtaram on Twitter

7 thoughts on “How to export directory listing to text file”

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 )

Google+ photo

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

Connecting to %s