title: using icacls in batch file
body: <p>I want to make a batch file which applies permissions to a given user folder using icacls. This is the batch file i made :</p>
  
  <pre>
  @echo off
  
  set /p username=Enter username:
  
  echo Select permissions :
  
  echo N  - no access
  echo F  - full access
  echo M  - modify access
  echo RX - read and exe
  echo R  - read-only acc
  echo W  - write-only ac
  echo D  - delete access
  
  echo.
  
  set /p perm=Enter permissions:
  
  if %perm%==F
  
  icacls "C:\Users\%username%" /grant:r "%username%:(OI)(CI)F"</pre>
  
  <p>When i run this file and enter permissions as F, it displays this <strong>error : The syntax of the command is incorrect.</strong> but if i run the same command directly in cmd it works perfectly. So, how do i correct the command in batch file so that it runs without any issues?</p>