1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
@echo off set /P "Test=Please enter date (yymmdd): " echo %Test% call :Xlate Test echo %Test% exit /b :Xlate VariableName for %%I in ("0=r" "1=z" "2=x" "3=u" "4=c" "5=m" "6=f" "7=n" "8=a" "9=s") do call set "%1=%%%1:%%~I%%" exit /b