I have the following batch script to print all the folders under a directory
for /d %X in (c:\web\*) do echo %X
and it prints out
c:\web\folder1
c:\web\folder2
....
Can i change the batch script and remove the path and only prints out folder name?
folder1
folder2
....
Thanks
See also
for /?. Thensays “just the filename” and thexsays “just the extension,” in case you’ve got directory names containing a period.