List Directories as Menu Options
Posted: 05 Sep 2011 02:31
Morning All,
Im currently trying to list the subdirectories as menu options within a batch file.
Ive gotten so far but unable to get menu choices displayed.
What i have so far is:
SET option=1
ECHO.
for /d %%X in (C:\BusNet\Code\armbus\*) do (
SET /a option+=1
ECHO. %option% %%X
)
PAUSE
How ever the option variable does not increment in the FOR loop. CHecking this on completion of the loop it has incremented each time but still displays the origional setting '1'
Once i've got this woking i need a way of transposing the user enetered number back to the corresponding directory.
Any help / suggetsions would be apprecciated.
Thanks
Im currently trying to list the subdirectories as menu options within a batch file.
Ive gotten so far but unable to get menu choices displayed.
What i have so far is:
SET option=1
ECHO.
for /d %%X in (C:\BusNet\Code\armbus\*) do (
SET /a option+=1
ECHO. %option% %%X
)
PAUSE
How ever the option variable does not increment in the FOR loop. CHecking this on completion of the loop it has incremented each time but still displays the origional setting '1'
Once i've got this woking i need a way of transposing the user enetered number back to the corresponding directory.
Any help / suggetsions would be apprecciated.
Thanks