Friday, 3 May 2013

Easy way to copy directory listing in Windows 7 & 8

I have found this very helpful lately, since I have had a need to copy all file names of a directory to a for example an email:

From a command prompt, go to the directory where you want the listing from.

Write: dir /B > listing.txt

And that's it. You can close the command prompt. File names are in the listing.txt file. The /B -switch means "bare", so only names are included, one can of course leave that out or use other switches.