Generate a text file with subfolders in a location on explorer

I needed to generate a list of folders and their subfolders, I used a simple command for dir command and slapped into a text file.
Below replaced with the folder you want to get the list from (i.e C:\Users\Default) and replace with where you want to save a textfile (i.e C:\textfile.txt).

dir /b /s /a:d "<Location>\*" > <TextFile>

Credit: SS64