Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

how do use if A permission is mapped to the folder need to run fix1.bat file, If B permission is mapped to the folder need to run fix2.bat file

$
0
0

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






Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>