How to execute iCACLS from (.cmd) or (.bat) file
I have the following command to set the folder permission
FOR /F %i IN (D:\Sample\Sample.txt) DO ICACLS /grant "IIS_IUSRS":(OI)(CI)F
for particular path obtained from the text file, this works fine if i execute independently from the command prompt window, but the same syntax does not work if add it .cmd or .bat file and try to execute, please can i know am i missing any additional syntax
to make this perfectly work when it is ran through .cmd or .bat file Mahesh
April 7th, 2012 5:43am
This work (in your example the %%i was absent ...)
@echo off
::
:: acl.cmd
::
FOR /F %%i IN (D:\Sample\Sample.txt) DO ICACLS %%i /grant "IIS_IUSRS":(OI)(CI)F
Gastone Canali >http://www.armadillo.it
Se alcuni post rispondono al tuo quesito (non necessariamente i miei), ricorda di contrassegnarli come risposta e non dimenticare di contrassegnare anche i post utili . GRAZIE!
Free Windows Admin Tool Kit Click here and download it now
April 7th, 2012 8:06am