I got a problem,
Im trying to make a numerated list of a directory and its containing folders for a text based menu. Main Problem is, that i want them to be numerated. for example:
1:Folder A
2:Folder B
3:Folder C
my idea was to write the directory and its containing folders in a seperate file and read the lines after each other adding a variable in front which increases each line. sadly it does not work. All i get is:
0:Folder A
0:Folder B
0:Folder C
@echo off
dir "directory" /a:d /b > tmp.txt
for /f "tokens=* delims= " %%a in (tmp.txt) do (
set /a N+=1
echo %N%:%%a
)
regards