Question : Question about BATCH file - stored values??

Ok so I'm creating a batch file and in it I would like it at some point to prompt the user this:

Please Enter todays date: (ex: feb 11, 1997 is 971102)
Here the user would input todays date such as the example....101407

I want the number the user inputs to give them a password.  The password is created by each number = to a letter of the alphabet.

So...

0 = r
1 = z
2 = x
3= v
4 = c
5 = m
6 = f
7 = n
8 = a
9 = s

So for that date the user inputted the value: 101407 .....the password would be: zrzcrn

Now....i know it sounds complex, but can i have those numbers stored in this batch file or another file and have the user input the date ranges and have the bat file calculate that and show them the password?

Answer : Question about BATCH file - stored values??

Give this approach a try.  It uses a small subroutine to do the translation.

~bp
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
Random Solutions  
 
programming4us programming4us