Used for testing digital need to fill 0, headache with windows. Finally we found a way.
In fact, if the word: Set "Num = 000% a %" & Set "Num = Num:!! ~ -3"
examples are as follows:
@Echo Off&SetLocal EnableDelayedExpansion
set a=2
Set "Num=000%a%"&Set "Num=!Num:~-3!"
echo %Num%
echo %a%
pause