Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.bat Cypher Program

Status
Not open for further replies.

remeng

Technical User
Jul 27, 2006
520
US
Hi All,

I am not sure if this is the right place to post this but what the hey. I am looking to make a fun little program that will take a sentence or a series of numbers and convert it into a substitution code that is somewhat random. For example:

If the input was say CAT, the output might be FGA or something. I was thinking that the person would need to enter a two digit number to generate the same cypher as the code was created.

For example if entered the number 21 then CAT = FGA , but if the number 10 was entered that CAT = BOB.

Then the reverse would be to decipher the code and they would need to put in the same number again to gain the clean text.

I am looking to make this in .BAT just for fun. Any ideas?

Thanks all,

Mike
 
Not a direct answer, but you may find this thread interesting: thread68-1647831
 
jges,

Thanks for the link however these are two different programming languages. This wont work in .BAT as I understand it.

I have created now 75% of the program and the problem that I am working on is to import text in a .txt file as a variable so that it can be passed on later.

Any ideas on how to import the text into a .BAT variable?

The second issue that I am trying to solve is an IF statement that converts a character in a sentence into a number.

for example,

A = 1
B = 2
O = 3
Y = 4
space = 5

so if the sentence is: "A Boy" I would like it to convert to 15234

any ideas?
 
>This wont work in .BAT

However, this is a VBScript forum ...

>I am not sure if this is the right place to post this

Not really - on the other hand I'm not sure we have got a forum for commandline batch programming
 
Yes I don't think there is a proper forum for batch programming questions. I have seen batch file questions posted in the Windows XP forum, with some very good responses in the past, but those mostly deal with file manipulation... This question is a bit different from most batch questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top