Not exactly a DOS command, but the more powerful Powershell command will get what you asked, I think:
get-childitem -recurse -directory -path 'c:\folder name' -name
Here is the full documentation:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.2
Hope this helps.
Bin Zhang (he/him)
Systems & Technologies Librarian
Library Systems and IT Services, University Library
California State University, Sacramento
[log in to unmask] | (916) 278-5664
Zoom: https://csus.zoom.us/my/bzhang
-----Original Message-----
From: Code for Libraries <[log in to unmask]> On Behalf Of charles meyer
Sent: Thursday, June 9, 2022 8:35 AM
To: [log in to unmask]
Subject: [CODE4LIB] List Names - sub-folders names
Hi All,
This task used to be a lot easier in XP.
In W10, I’m trying to print a list of sub-folder names in a folder.
I’m not interested in the folder or sub-folder contents nor the files contents, just the file names.
Googling resulted in just results to print the folder contents or the files contents but not just the sub-folder names.
Have you had to buy a commercial program to do that?
I'm hoping there's a solution besides some DOS line command option!
Thank you!
Charles.
Charles Meyer
Charlotte County Public Library
Port Charlotte, FL
|