Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am checking a text file for a pass, and I want to compare it with user input. This is what I have so far but whatever I input for it, it unlocks. It's not working been racking my brain on this for couple days now.

Its not a high security thing just something im playing with to learn.

The pass file contains

Password=savepass


for /f "tokens=1,2 delims==" %%a in ("pass") do (
set savepass=%%b
)
cls
echo.
echo Enter password to unlock folder
set /p "pass=>"

if not %pass%==%savepass% goto FAIL`
share|improve this question
Ok solved my own question thanks anyway. I added set savepass above for /f "tokens=1,2 delims==" %%a in ("pass") do ( now it works perfectly :) – Brad Heffernan Oct 14 '12 at 11:18

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.