Q: Asking user input in for loop with if else statement I am using below script to find fixed drives in a system and if user want to continue he/she have to enter a particular letter. But i am unable to run this code any help is appreciated.
@echo off
for /F "tokens=1*" %%a in ('fsutil fsinfo drives') do (
   for %%c in (%%b) do (
      for /F "tokens=3" %%d in ('fsutil fsinfo drivetype %%c') do (
         if %%d equ Fixed (
            echo  %%c is a Fixed Drive 
set /p ent= Enter e to continue=
if %ent%==e (goto DRIVE)else (goto INT)


         )
      )
   )
)


A: You need to use delayed expansion and this syntax - note the !variable!
if /i !ent!==e (goto DRIVE) else (goto INT)

