How to copy all file names of a folder

Category: Tutorials

Here is neat command line that helped me out.

I had a folder with a bunch of files and I needed a list of all the file names.

Manually would have taken for ever, so here is a faster way to do it in case you need to:


From here cd to the location of your folder. In my case it was a folder named classes on my desktop. So:

That should give you something like this:

Once your are here, simply type in the following:
DIR /B /O:N > filename.txt

Hit enter and voila!

You now have .txt file on your folder named filename.txt with all the file names of your folder. You copy them and send them to excel or whatever you want.


Tut` bY cotufa-ssdd


  • Views: 1092
  • Date: 14-05-2011, 17:18
  • Share:
Who read this article:(2)