It is very strange, but the Windows graphical interface does not provide any means of obtaining a list of folders or files in any directory in text format. It would be logical to have such a function somewhere in the file manager (Explorer), but you will not find it there. The only thing that exists in the standard distribution is the rudimentary DOS commands of the last century. It is much easier to use third-party cataloging software.
Necessary
Karen's Directory Printer Program
Instructions
Step 1
Folders can be listed using the DOS commands dir and tree. But, firstly, it is not very convenient to launch the command line terminal every time and return to DOS like in the stone age, moving through the directory tree to the desired starting point using another DOS command. And secondly, the list obtained by this method will also have DOS encoding, i.e. all Cyrillic folder names will have to be converted from "kryakozyabli" to Windows encoding before use.
Therefore, it is better to use separate cataloging programs. For example, Karen's Directory Printer. After its installation, an additional item appears in the context menu of folders and disks on the computer - Print with DirPrn. In order to get a list of the contents of any medium, right-click it and select this item from the drop-down menu.
Step 2
As a result, the program window will start, in which you need to select one of the tabs. If you want to print the list, then click the Print tab, and if you want to save it to a file, go to the Save To Disk tab. You will have a wide range of settings that determine what kind of information the list should contain. If you need a list of only folders (without files), then check the box next to Filder info only. Whether the list should include and subdirectories can also be specified using the label next to the Search Sub-Folders item. In the right column (Filder Info) mark all other folder information that the table should contain. After that, click the Save To Disk button in the lower left corner of the window.
Step 3
A standard window for saving the file will open, where you need to specify the name and location of the list. Once done, click the "Save" button.
Step 4
Now you have a file with a list of folders. Each line contains information about one folder, separated by a tab. This format is perfectly understood by the spreadsheet editor - if you open the file, for example, in Excel, it will split the information into rows and columns and you will have a table that you can further use at your discretion.