I want to fetch the names of the subfolders inside a folder using windows batch script. Can anyone pls help me out?
Asked
Active
Viewed 929 times
1 Answers
0
This will give you the list of directories (folder) within your chosen directory (folder).
dir path-to-folder /ad

Jacobo de Vera
- 1,863
- 1
- 16
- 20
-
Thanks a lot. How could I store the name of that subfolder for subsequent use? Any help would be much appreciated! – sid Sep 06 '10 at 10:58
-
I don't know how to do that, sorry, but somebody seems to have [answered a similar question](http://stackoverflow.com/questions/998366/how-to-store-hostname-in-a-variable-in-a-bat-file) before. – Jacobo de Vera Sep 06 '10 at 13:41