Let’s suppose we need all the sub folders, file names which reside one folder named “Test” in D drive.
Go to Run, Type CMD to open command prompt.
Go to D prompt, by typing D:
Then D:\>cd Test
Now you are in Test folder and type the command D:\Test>dir /s== >result.txt
result.txt is the file name which includes all the sub directories and file names inside the folder D:\Test.