Apologies, you wanted *just* folder and subfolder names? Try the following
Powershell command instead and paste into a word processor or spreadsheet:
tree|clip
This will produce some question marks which you can delete via find-replace
or can use to figure out subfolder relationships from a spreadsheet program
using Text to Columns (using question mark as the delimiter).
On Thu, Jun 9, 2022 at 12:08 PM Dan Johnson <[log in to unmask]> wrote:
> To simplify the Powershell option even further, the following command
> gathers all the files in the current folder and its subfolders into a list,
> and puts the result directly into the clipboard, so you can just paste into
> your word processor immediately after running it:
>
> get-childitem -Recurse -Name|clip
>
> Note that the vertical straight line | is a pipe character (which shares
> the same key, via shift, as backslash on my keyboard).
>
> Best,
> Dan
>
> On Thu, Jun 9, 2022 at 12:03 PM Bill <[log in to unmask]> wrote:
>
>> That's what I was thinking as well. The example I worked with was:
>>
>> PS C:\Users\Will> Get-ChildItem -Recurse test | ?{ $_.PSIsContainer } |
>> Select-Object FullName
>>
>> FullName
>> --------
>> C:\Users\Will\test\bazinga
>> C:\Users\Will\test\hamdinger
>> C:\Users\Will\test\superwhammy
>> C:\Users\Will\test\hamdinger\mst3k
>>
>>
>> -Bill
>>
>> On Thu, Jun 9, 2022 at 11:59 AM Zhang, Bin <[log in to unmask]> wrote:
>>
>> > 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
>> >
>>
>
>
> --
> *Daniel Johnson, Ph.D.*
> *English; Digital Humanities**; and Film, Television, and Theatre *
> *Librarian*
> *Navari Family Center for Digital Scholarship, **Hesburgh Libraries*
>
> *University of Notre Dame*
> 250C Hesburgh Library
> Notre Dame, IN 46556
> o: 574-631-3457
> e: [log in to unmask]
>
>
>
>
>
>
--
*Daniel Johnson, Ph.D.*
*English; Digital Humanities**; and Film, Television, and Theatre *
*Librarian*
*Navari Family Center for Digital Scholarship, **Hesburgh Libraries*
*University of Notre Dame*
250C Hesburgh Library
Notre Dame, IN 46556
o: 574-631-3457
e: [log in to unmask]
|