I want to print a numbered list of the file names in a directory.
I tried
dir /w > test.txt
What are the commands to do this?
|
I want to print a numbered list of the file names in a directory. I tried
What are the commands to do this?
| ||||
|
feedback
|
"%%~fF" prints the full path. To print the short filename, use "%%F". See Edit: to pass in a directory, change it to
And call it with a directory name with a following slash ("C:\Windows\", not "C:\Windows"), or with no directory name. You could also change to the directory with Edit: Here's a more complete, annotated version. It also lists directories -- I missed that
Simply save to a file with the extension | |||||
feedback
|
|
If using Windows with NTFS, I think this could be done with the Everything search engine. It can search for file types, with particular elements in the file name, supports regular expressions, and can export to .txt.
| |||||
feedback
|