I am having a list of id number like the following:
123
4456
657
23
199
i would like to add padding zero to it so that it will end up with 5 digit with result like this:
00123
04456
00657
00023
00199
I have looked up online but couldn't really find a solution for .bat file. I have tried something like the following:
set num_max=5
set my_num=123
set "my_num=00000%my_num%"
set "mynum=!my_num:!~-%num_max%!"
echo %my_num%
but the reuslt becomes something like 00000123. I have a loop to read all the input value
for /f "tokens=1" %%a in (.\config.ini) do (
echo %%a
)
``` and the %%a is the value that I would like to add the padding zero to.