I'm looking for a way to get all the names of directories in a given directory, but not files.
For example, let's say I have a folder called Parent
, and inside that I have 3 folders: Child1
Child2
and Child3
.
I want to get the names of the folders, but don't care about the contents, or the names of subfolders inside Child1, Child2, etc.
Is there a simple way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…