Monday, 27 January 2014

Tech tricks: listing a directory

I had to do this a few times recently, and had to look up the details (I've forgotten where, unfortunately), so thought I'd spread it around.

To get a usable list of items in a directory...

  • Create a text file with this content: dir/b *.* >dirlist.xls
  • Change the text file extension from .txt to .bat
  • Move the .bat file to the folder you want to list
  • Double-click the .bat

This will create a spreadsheet in that folder, called dirlist.xls, that lists the contents of the folder.

No comments:

Post a Comment