Recursive directory listing in DOS

StarDotStar picture StarDotStar · Mar 4, 2010 · Viewed 296.9k times · Source

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.

Answer

Michael Todd picture Michael Todd · Mar 4, 2010

You can use:

dir /s

If you need the list without all the header/footer information try this:

dir /s /b

(For sure this will work for DOS 6 and later; might have worked prior to that, but I can't recall.)