Importing file names from a folder into a text file?

glatt • Oct 11, 2007 8:51 am
Is there a simple way to take a bunch (around 300) of file names from a folder in Windows XP and dump those names into a single text file so you can edit them? I know you can do them one at a time by copying and pasting, but is there some other way to do all at once?

Is there a way to do this in DOS? It's been too many years since I used DOS and can't remember, but I think there was a way to at least print the file names. Maybe DOS is the best approach?

I really don't want to copy and paste these names individually. Help!
Pie • Oct 11, 2007 10:28 am
dir > temp.txt

open in editor of your choice.
glatt • Oct 11, 2007 10:42 am
Thanks!
dar512 • Oct 11, 2007 1:18 pm
Add a /b if you only want the filenames

dir /b
glatt • Oct 11, 2007 1:30 pm
That (/b) tip works like a charm. Then with a little "find and replace" action, I was able to get rid of all the path information in the front of the file names. I've now got a nice neat list.

Thanks.

You'd think Windows would make such a simple thing possible though, without resorting to DOS. Not many people out there know DOS.