VBScript provide a list of folders and the permissions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
Does anyone have a vbscript to provide a list of folders and the permissions?

Thanks
 
Maycon said:
Hi
Does anyone have a vbscript to provide a list of folders and the permissions?

Thanks

Try this batch file:

Line1 @echo off
Line2
Line3 set source=d:\My Shares
Line4 set target=c:\%Permissions%.txt
Line5
Line6 echo Compiling a directory listing
Line7 dir /b /ad /s "%source%" > c:\dir.txt
Line8
Line9 echo %date% at %time:~0,5% > %target%
Line10 echo List of access rights >> %target%
Line11 echo ==================== >> %target%
Line12 for /F "tokens=*" %%* in (c:\dir.txt) do (
Line13 echo Processing %%*
Line14 cacls "%%*" >> %target%
Line15 )
Line17 del c:\dir.txt
Line18 notepad %target%
 
Works very well. Thanks


Pegasus (MVP) said:
Try this batch file:

Line1 @echo off
Line2
Line3 set source=d:\My Shares
Line4 set target=c:\%Permissions%.txt
Line5
Line6 echo Compiling a directory listing
Line7 dir /b /ad /s "%source%" > c:\dir.txt
Line8
Line9 echo %date% at %time:~0,5% > %target%
Line10 echo List of access rights >> %target%
Line11 echo ==================== >> %target%
Line12 for /F "tokens=*" %%* in (c:\dir.txt) do (
Line13 echo Processing %%*
Line14 cacls "%%*" >> %target%
Line15 )
Line17 del c:\dir.txt
Line18 notepad %target%
 
Back
Top