:prompt
set /p "asm_file_path=Enter full path name of asm file:"
pause
rem Validate the file path
:validate
if not exist %asm_file_path% (
echo Error! %asm_file_path% does not exist. Please enter valid file
echo.
goto prompt
) else (
echo File found. Continuing...
echo.
)
I am simply trying to get a user input and store it into var asm_file_path. But for some reason the program goes into an infinite loop of Error! because the var is equal to " ". I've tried How to get two or more commands together into a batch file and How to read input from console in a batch file? and even the dos guide, but i just can't see what is wrong here.
Edit The program does not let me enter anything. I am using Windows 98.