I am trying to print a list of the folders and sub folders of a directory to a file.
When I run dir
dir
I used dir /s /b /o:n /a:d, and it worked perfectly, just make sure you let the file finish writing, or you'll have an incomplete list.
dir /s /b /o:n /a:d