|REM This first set statement prompts the user for the input|
set /p choice=Enter the password:
REM Then it appends that input to one_file.txt
echo %choice% >> one_file.txt
REM Then this statement searches the file for that string
findstr %choice% one_file.txt
REM Errorlevel 1 means that the string exists
REM the double pipe "||" translates as "else" in batch
REM So the whole statement translates as:
REM If the string is found echo "password found!", if not (else) echo "password not found!"
if errorlevel 1 echo password found! || echo password not found!