Daily Technology News, Tips, and Reviews | Subscribe to Jason Slater Technology BlogTechnology Feed | Join Jason Slater on TwitterTwitter | Thursday 2nd September 2010

Tip: List files and save in a text file

By Jason Slater
  • DiggThis
  • Share

A quick tip for obtaining a list of files in sub folders and presenting the results in a list suitable for loading into programs like Excel:

dir "folderpath" /s /b /a-d >outputname.csv

http://www.jasonslater.co.uk

This can also be combined with the find command to filter the results

dir "folderpath" /s /b /a-d |find "word" >outputname.csv

Multiple finds can be used to further refine the list:

dir "folderpath" /s /b /a-d |find "word1" | find "word2" >outputname.csv

http://www.jasonslater.co.uk

These commands could be placed into a .cmd file then placed as a shortcut on the desktop.

Related

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

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>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.