In my application, I get a number having leading zeros. I am trying to trim the leading zeros and get the actual number. I tried using /a switch which considers
/a
I found this problem when trying to solve a similar issue myself. I liked your solution until I realized there is a slightly better way:
SET /a N=1%N%+1%N%-2%N%