
What is wrong with my script???
Code:
REM Changes the permission of specified file to specified Access for specified group and logs the output.
echo ------------ >> %Output%
echo ***Change*** >> %Output%
echo ------------ >> %Output%
for /f "delims=" %%y in (%Input%) do (
echo icacls %%y /grant:r %Group%:(%Permission%) >> %Output%
icacls %%y /grant:r %Group%:(%Permission%) 2>> %Output%
)
echo. >> %Output%
And the output that gets displayed is:
Code:
------------
***Change***
------------
icacls C:\Test_File.txt /grant:r EVERYONE:(F
icacls C:\Test_File_2.txt /grant:r EVERYONE:(F
%y: The system cannot find the file specified.
I can't figure out why it's not using the value from the file that it should be pulling.
Thanks for any help