SOLVED-'Maximum setlocal recursion level reached'

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Xboxer
Posts: 25
Joined: 27 Nov 2014 13:58

SOLVED-'Maximum setlocal recursion level reached'

#1 Post by Xboxer » 28 Nov 2014 20:01

Received this error msg today while working on a batch file.what gives with this? http://postimg.org/image/7vdem6p7l/

Edit: Found my answer (Thanks to dbenham) over here ==> http://stackoverflow.com/questions/1191 ... sing-menus
also was running all WMIc commands with the file name the same, once I renamed my batch file, problem solved..
bob :D
Last edited by Xboxer on 29 Nov 2014 03:58, edited 2 times in total.

Squashman
Expert
Posts: 4487
Joined: 23 Dec 2011 13:59

Re: 'Maximum setlocal recursion level reached'

#2 Post by Squashman » 28 Nov 2014 21:22

I wish I was omniscient. Until that day most of us will need to see the code.

npocmaka_
Posts: 516
Joined: 24 Jun 2013 17:10
Location: Bulgaria
Contact:

Re: 'Maximum setlocal recursion level reached'

#3 Post by npocmaka_ » 29 Nov 2014 03:45

maximum level of setlocal is 32 (http://ss64.org/viewtopic.php?id=1778)
check if you are setting setlocal in loop without using endlocal.

Post Reply