Sorry for bad description, i am expecting the following output:
- FolderA
- FolderB
- FolderC
The following code does not work for me
@ECHO OFF
set /a count=0
for /d %%d in (*) do (
set /a count+=1
@echo %count%. %%d
)
PAUSE
The counter stays at 0.
What you need is delayed variable expansion. For that, simply make the following 2 changes:
setlocal EnableDelayedExpansion
to the top of your command file.%count%
with!count!
.The result is: