Displays subfolders as a comma seperated list

Don
Joined
21 Oct 2002
Posts
46,828
Location
Parts Unknown
Sure I've done this before, but can't think right now.


I've got a folder like this..

Folder\
Sub1
Sub2
Sub3
Sub4
file.txt



If I'm in Folder, what command can I use to create a file that will display them like this.

I assume along the lines of..

dir /b >folders.txt, but that lists then in a vertical line

folders.txt
Sub1,Sub2,Sub3,Sub4
 
Back
Top Bottom