Create sub directories

  • Thread starter Thread starter Carl Hilton
  • Start date Start date
C

Carl Hilton

I need a tool that will automatically browse through my user directories and
create a specific subfolder with specific permissions...Specifically say all
my user id's begin with UID_XXX. The this script will search for all folders
named UID_XXXX and create a subdiretory called "MAIL" and set the
permissions on UID_XXXX\MAIL so that only UID_XXXX and DOMAIN ADMINS have
full control and BACKUP OPERATORS have read access.

Thanks
Carl
 
I need a tool that will automatically browse through my user directories and
create a specific subfolder with specific permissions...Specifically say all
my user id's begin with UID_XXX. The this script will search for all folders
named UID_XXXX and create a subdiretory called "MAIL" and set the
permissions on UID_XXXX\MAIL so that only UID_XXXX and DOMAIN ADMINS have
full control and BACKUP OPERATORS have read access.

Using MS's CMD.EXE:
for /D %I in (UID_*) do (md %~nI\MAIL & xcacls %~nI\MAIL /G %~nI:F "Domain Admins":F "Backup Operators":R /Y)

XCACLS is from the NT Resource Kit
<http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/xcacls-o.asp>
 
Back
Top