# Solved: Batch OS



## St0ner95 (Sep 15, 2012)

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...


```
@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


----------



## Squashman (Apr 4, 2003)

Read the hep for the IF command. You are making a simple syntax error.


----------

