How do we achieve a recursive directory listing in DOS?
I'm looking for a command or a script in DOS which can give me the recursive directory listing similar to ls -R
command in Unix.
How do we achieve a recursive directory listing in DOS?
I'm looking for a command or a script in DOS which can give me the recursive directory listing similar to ls -R
command in Unix.
You can use:
If you need the list without all the header/footer information try this:
(For sure this will work for DOS 6 and later; might have worked prior to that, but I can't recall.)
You can use various options with FINDSTR to remove the lines do not want, like so:
Normal output contains entries like these:
You could remove these using the various filtering options offered by FINDSTR. You can also use the excellent unxutils, but it converts the output to UNIX by default, so you no longer get CR+LF; FINDSTR offers the best Windows option.
I like to use the following to get a nicely sorted listing of the current dir:
You can get the parameters you are asking for by typing:
For the full list, try:
dir /s /b /a:d>output.txt
will port it to a text file