below mentioned two .bat files need to merge as a single file with auto process.
I have 2 bat files for folder permission setup and revoke for example if one folder having A permission need to run Fix1. bat file. if second folder having B permission need to run fix2.bat file.
Fix1.bat file information :-
cd /d X:\Test\Test
icacls %1 /grant xx\AB:(OI)(CI)(RX)
icacls %1 /grant xx\c:(OI)(CI)(IO)(M)
icacls %1 /grant xx\c:(RX,W)
icacls %1 /grant xx\%1 (User name):(OI)(CI)(IO)(M)
icacls %1 /grant xx\%1 (User name):(RX,W)
icacls %1 /remove "xx\A"
icacls %1 /remove "xx\D"
icacls %1 /remove "xx\E"
icacls %1 (User name)
cd/
Fix2.bat file information :-
cd /d X:\Test\Test
icacls %1 /grant xx\BA:(OI)(CI)(IO)(M)
icacls %1 /grant xx\BA:(RX,W)
icacls %1 /grant XX\%1 (User Name):(OI)(CI)(IO)(M)
icacls %1 /grant XX\%1(User Name):(RX,W)
icacls %1 /remove "XX\B"
icacls %1 /remove "xx\E"
icacls %1
cd/
Regards, Raja.S