How can I store the value of a variable that can be used to initiate the next batch?
For example: I store a password in the batch then the next time you want in that variable there is my password ...
How can I do?
Thanks, Walter.
Store variable
Moderator: DosItHelp
Re: Store variable
LOL, sorry but passwords and batch ... the same like fire and water
Remember, all things are in plain text. Everybody can read it!
OK, to answer your question, here the principles.
Write a single line into a file:
Read the first line of a file:
Regards
aGerman
Remember, all things are in plain text. Everybody can read it!
OK, to answer your question, here the principles.
Write a single line into a file:
Code: Select all
set /p "passWrite=Enter your password: "
>"pass.txt" echo(%passWrite%
Read the first line of a file:
Code: Select all
set /p "passRead="<"pass.txt"
echo(%passRead%
Regards
aGerman
-
- Posts: 21
- Joined: 11 Dec 2010 10:17
Re: Store variable
yes yes I know it does not make sense to put a password in a batch ... just what I need for one small thing...
anyway thanks a lot, always accurate ...
Regards, Walter.
anyway thanks a lot, always accurate ...
Regards, Walter.