Many times I needed to save a list of files/names in a directory. Every time I forget how to do it and have to google for it.
The solution is pretty simple:

 
>dir /b > files.txt

OR

>dir /b /s > files.txt

for recursive listing.