sup, I am making a program that takes and stores user input in a .txt file (basically stores a password) after that you can go and check the password (to maybe unlock or open something, etc) for some reason when I try to compare the two passwords the program quits in both ways, this is the problem, thx if you help
this is the code:
@echo off
:start
echo -create (make a password)
echo -check (check a password)
set /p PROGRAM= enter opperation:
goto %PROGRAM%
:create
cls
set /p data= enter data:
echo %data% > C:\Users\Hp\testfile.txt
echo done!
pause
goto start
:check
cls
set /p data2= what is your password?
for /f "Delims=" %%realdata in (C:\Users\Hp\testfile.txt) do (
set TEXT=%%realdata
)
if %data2%==%TEXT%
(
pause
goto correct
)
echo wrong, try again
pause
goto start
:correct
echo good job
pause
goto start