dir %1 /-p /a /o /b>"%temp%\file list"
notepad "%temp%\file list"
Directory listing
of the first parameter passed in
using flags :
Don't page/pause output
displays the names of all files, including hidden and system files.
displays the names of the directories, sorted in alphabetic order, and then displays the names of files, sorted in alphabetic order
Lists each directory name or file name, one per line, including the file name extension.
Redirected output to a file in the system temp folder
using filename "file list"
Open Notepad with the saved file.