That looked like it worked (it listed all the files in the command prompt window) but there is no txt file in the root of the drive which I was listing.
Instead of using the dir command you might want to use the tree command, in particular if you use the /a and /f arguments. Piping it out to a text file, of course.
This should work (not on a Windows box so can't test it)...
tree makes it look nice and you can visually see the file structure...
The output should look something like this:
That screenshot didn't use the /f parameter, so it's just showing the directories, but if you include the /f when you call the command then it also includes each file within the individual folders in the output too.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.