[Batch] List folders and subfolders.
Math
-
roro -
roro -
Hello everyone, :)
My question is probably simple, but despite my numerous searches, I can't find the solution... :(
I would simply like to list the names of the folders and subfolders in a directory so I can perform some actions with these names.
I think I need to use a For /F loop, but I can't find the exact syntax.
Can someone help me? :)
Thank you. ;)
Configuration: Windows 7 / Firefox 6.0.1
My question is probably simple, but despite my numerous searches, I can't find the solution... :(
I would simply like to list the names of the folders and subfolders in a directory so I can perform some actions with these names.
I think I need to use a For /F loop, but I can't find the exact syntax.
Can someone help me? :)
Thank you. ;)
Configuration: Windows 7 / Firefox 6.0.1
5 answers
Thank you all, I found the exact syntax. :)
I am using:
This allows listing the names, and only the names, of the subdirectories of multiple levels in a folder. ;)
I am using:
for /f "delims=" %%a In ('dir /ad/b/s "Folder" ') Do ( echo %%a ) This allows listing the names, and only the names, of the subdirectories of multiple levels in a folder. ;)
roro
Thank you very much, perfect. I just removed the /s so as not to go down into the directory.