You can use the DIR command. Open a command window, navigate to your folder and type DIR >index.txt (or any name you like) and press enter. This will generate a file index.txt inside the folder. Type DIR /? for other switches like sort order or files to show or exclude.
Opening a Command Prompt to a Particular Directory From Explorer
If you want to open a command prompt to a directory that is selected in the Explorer:
1. Start Regedit
2. Go to HKEY_CLASSES_ROOT \ Directory \ shell
3. Create a new key called Command
4. Give it the value of the name you want to appear in the Explorer. Something like Open DOS Box
5. Under this create a new key called command
6. Give it a value of " cmd.exe cd %1 " (no quotes)
7. Now when you are in the Explorer, right click on a folder, select Open DOS Box, and a command prompt will open to the selected directory.