Re: Folder depth & cacls
- From: Jerold Schulman <Jerry@xxxxxxxxxx>
- Date: Fri, 15 Jul 2005 11:02:21 -0400
On Fri, 15 Jul 2005 02:15:02 -0700, JAR <JAR@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>I am trying to edit the permissions of two folder trees (on 2 servers) using
>either cacls or xcacls (want to add permissions for a specific group so don't
>want to use the GUI) and am hitting a problem related to the folder depth
>and/or path length. The process runs so far but then fails and I'm pretty
>sure it's related to the depth of some folders.
>
>Getting either "The data area passed to a system call is too small" or "The
>filename, directory name, or volume label syntax is incorrect." dpending on
>which server I run it on.
>
>If I knew that it was only affecting a couple of folders I would just go
>down one level and run the command there but I know this is NOT the case as
>there are a LOT of folders to run through.
>
>Does anyone have any ideas for a workaround for this - maybe using a script
>or something ?
>
>Thanks
>
>
See if something like this works:
@echo off
setlocal
set work=C:\Folder
pushd "%work%"
@echo Y| CALCS "%work%" /E /C /G ....
for /f "Tokens=*" %%a in ('dir /b /a /s') do (
call :sub "%%a"
)
endlocal
goto :EOF
:sub
set fold=%~DP1
if /i "%fold%" EQU "%work%" goto sub1
pushd "%fold%"
set work=%fold%
@echo Y| CALCS "%work%" /E /C /G ....
:sub1
set file=%~nx1
@echo Y| CALCS "%file%" /E /C /G ....
..
.
- References:
- Folder depth & cacls
- From: JAR
- Folder depth & cacls
- Prev by Date: Re: Windows 2000 File Listings
- Next by Date: Re: Folder depth & cacls
- Previous by thread: Folder depth & cacls
- Next by thread: Re: Folder depth & cacls
- Index(es):
Relevant Pages
|