dir /a /b /-p /o:gen >A:\file_list.txt start notepad A:\file_list.txt
Useful when archiving.
Possible scenarios are:
A folder with thousands of items in it. Place this code into a text file and save it, then rename the file to your liking and append the extension to .bat and save it. Copy the file to the folder where all your files to be listed are, then click on the bat file and it should produce a text file listing all items in the folder. This would be helpful if you keep records of your files for future retrieval.