Create folder with permission
@echo off
for /f %%i in (x:\abc\namefile.txt) do mkdir g:\backup\%%i
g:
cd g:\backup\
FOR /D %%A IN (*) DO cscript x:\abc\xCACLS.vbs g:\backup\%%A /T /E /G domain\%%A:F
Remark: For/D %%A IN (*) which is the command running path (e.g. It running in g:\backup\), it will scan all folder in g:\backup\
The backup folder users permission need to set this folder only, otherwise it will inherited to the \backup\%username%
map drive by username
net use Z: \\abc_server\backup\%username%
No comments:
Post a Comment