title: ICACLS behaving weird when executed from batch file
body: <p>One of the feature i missed most from Windows 2003 and earlier is the ability to assign the same NTFS permission to multiple folder. This feature is no longer available in windows 2008, and i need to use icacls. This is my question. If i typed in:</p>
  
  <pre><code> FOR /F %i IN (D:\Sample\Sample.txt) DO ICACLS /grant "IIS_IUSRS":(OI)(CI)F 
  </code></pre>
  
  <p>directly into command prompt, everything works fine saying Successfully processed 1 files; Failed processing 0 files. HOWEVER, if i store the above command into a .bat file, and execute that batch file, it's failing to execute</p>
  
  <p>what am i doing wrong?</p>