Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Pass id & pw variables from bat to text file
Name: beard9232 Date: June 4, 2009 at 08:47:37 Pacific OS: Windows XP Subcategory: Batch
Comment:
I have a bat file that asks for user id and password then executes FTP reading the values in a text file. How do you pass the id and password variables to the text file?
bat file:
Echo Off CLS set /p userid=Enter Your Mainframe User ID : echo hP1X500P[PZBBBfh#b##fXf-V@`$fPf]f3/f1/5++u5>in.com set /p password=Enter Your Mainframe Password:<nul for /f "tokens=*" %%i in ('in.com') do (set password=%%i) del in.com cls echo %userid% echo %password%
Name: beard9232 Date: June 8, 2009 at 05:32:27 Pacific
Reply:
The code you provided is building the text file in the bat file. However, the password is displaying on the screen due to the echo and I can't have the password visible. That is why I was trying to pass the id and password to the text file as a variable, but I don't know if that can be done or not. Is there a way to hide the password using the method you provided?
0
Response Number 3
Name: beard9232 Date: June 8, 2009 at 10:53:50 Pacific
Reply:
I took off the -d in the ftp step and it stopped showing the password, but is there a better way of hiding the password?
Summary: hello all, i just recently got started programming in C++ using tutorials on the web and i'm learning how to read and wright to text files however i am stuck. i want my program to simply output the # ...
Summary: Hi A task which will run based on values provided to a parameter in textfile. i.e param1 = 123 Now i am paasing this value dynamically using a variable to that tast i.e param1 = B1 at this stage i am ...