dir x:\ >filename.txt will do the same for you from command prompt. with /s with subdirectories. oh, for the days of dos … :)
And some decent file managers that replace explorer do it for you, too.
The one I like best is xyplorer (xyplorer.com), but there are many others, some free …