| Member with 1 posts. THREAD STARTER | | Join Date: Sep 2012 Experience: Beginner | |
Solved: Batch OS Hi
im trying to create an os batch file and was wondering how to load the first line of a file to use as the password
anyway here is my code so far... Code: @echo off
:login
echo Login:
set /p luser="username: "
set /p lpass="password: "
set /p fpass= <Users/%luser%.txt
if %lpass%=%fpass% then
goto start
else
cls
echo Error Username/Password Incorrect!
goto :login
:start
set /p cmd="> "
if %cmd%="help" then
goto :help
if %cmd%="newuser" then
goto :newuser
:help
echo Commands:
echo help Shows This Help Screen
echo newuser Creates A New User Account
:newuser
set /p user="Username: "
set /p pass="Password: "
echo %pass% >> Users/%user%.txt
echo %user%'s Account Sucsessfully Created!
goto :start thanks alot
Last edited by St0ner95; 15-Sep-2012 at 11:17 AM..
Reason: easier to read now
|