# Windows command line list all directories

command linewindows

I'm looking to grab a list of the directories into a text document using a .bat file or the command line.

The problem I'm facing is that I have roughly twelve hard drives with a few folders in it, then inside those directories are around 163 more folders and I have to catalog them all.
Doing this by hand would be a huge task and I'm looking to simplify it.

If you need any more information please just ask and I will provide it.

dir /s > fileNames.txt