for /L %%X in (9,1,10) do ( echo %%X set p=%%X echo %p% if %%X lss 10 set p=0%p% )
Yet, it prints different results whenever I run it. I have a suspicion that the p in my script isn't actually set until the batch file has terminated, so I get the old value of p. But if I want to zero pad the values in a for loop, then how else am I supposed to do it?


Sign In
Create Account


Back to top









