Align Right

Align text to the right i.e. to improve readability of number columns.

Description: Add leading spaces to a string to make sure the output lines up. I.e. for variables no longer than 8 characters add 8 spaces at the front and then show only the last 8 characters of the variable.
Script:
1.
2.
3.
4.
5.
6.
set x=3000
set y=2
set x=        %x%
set y=        %y%
echo.X=%x:~-8%
echo.Y=%y:~-8%
Script Output:
 DOS Script Output
X=    3000
Y=       2