You are not logged in.
Pages: 1
Is there a native way to get current level of nesting when using Setlocal?
Offline
No. There is not a native way to do that, although you can get such value in a very simple way just executing SET /A LEVEL+=1 after each Setlocal...
However, the real question here is this: why do you need this value?
Offline
check here - https://ss64.org/viewtopic.php?id=1778
Offline
No. There is not a native way to do that, although you can get such value in a very simple way just executing SET /A LEVEL+=1 after each Setlocal...
However, the real question here is this: why do you need this value?
What I would like to get is rather complex task. Maybe it is wasted time. I would like to actually do some programming in CMD and batch, but I am constantly hiting wall because of weired special character escapeing mechanism. I know I can you "SET /A LEVEL+=1". I just asked if I can save some code lines and keep my script barebone minimal.
Offline
Pages: 1