batch file - Changing part of a string -
i have question batch-file. have script connecting drive on other pc on network. have fill in whole pc-name. every pc-name same last 3 5 numbers different. example pc000012345, pc000001234 or pc000000123.
now want if put 3 or 4 numbers in file other number(s) 0. example fill in 123 output must 00123 , if fill in 1234 output must 01234. possible within command/commands?
set x=1234 rem sure put enough zeros set y=0000000000%x% echo %y:~-5%
=>
01234
Comments
Post a Comment