.EXAMPLE.....: 72 Left-pad a number with zeroes, or a string with spaces .CATEGORY....: examples .DISCUSSION..: Pad a number (stored in environment variable) STRING
to the left with zeroes, to make sure it is 4 bytes long
.CODE........:
set STRING=1
Fdate /FE /Q%STRING% /Jr04 /Vstring
echo STRING is [%string%]
.DISCUSSION..: Here's another example -- we pad a string (stored in environment
variable) STRING to the left with spaces, to make sure it is 4
bytes long
.CODE........:
set STRING=aa
Fdate /Fe /Q%STRING% /J"r 4" /Vstring
echo STRING is [%string%]