This is a great script to enumerate Folder Permissions on MS Server. It outputs to a txt file.
What I would like to be able to do is tell the script to skip a folder. I'm not up to speed on scripting so I need some help.
I attached the script in the "Code" area.
I am running the script in a folder called UserData (the script doesn't care what this folder name is).
This folder has many subfolders for different business units to store their files.
I want the script to skip (pass over) a specific subfolder in UserData.
Thanks in advance! Let me know if this isn't clear.
' ACL Modifications by CyberneticWraith, 2005
' Changed it to display ACL information for folders
' Uses "cacls.exe"
' Run with cscript!
' Written by Keep Bertha Surfin Heavy Industries,
' a division of Keep Bertha Surfin Electrical Concern
' Version 1.0 - KeepBerthaSurfin@Hotmail.com
' First thing, check the argument list for a directory.
' If they didn't specify one, use the current directory.
' Run this on the File Server system you desire to get the ACL's from.
' To put this output into a file you just execute "cscript listacl.vbs > acl.txt".
' Run the function :)
set fso = createobject("scripting.filesystemobject")
if WScript.Arguments.Count = 0 then
loc = fso.GetAbsolutePathName(".")
loc = WScript.Arguments(0)
GetWorkingFolder loc, 0, 1, "|"
set fso = nothing
' called recursively to get a folder to work in
function GetWorkingFolder(foldspec, foldcount, _
Set objShell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
set fold = fso.GetFolder(foldspec)
set foldcol = fold.SubFolders
'do the first folder stuff
if firsttime = 1 then
foldcount = foldcol.count
firsttime = 0
remaincount = foldcol.count
'do the subfolder stuff
for each sf in foldcol
'execute cacls to display ACL information
Set oExec = _
objShell.Exec("cacls " & chr(34) & sf.path & chr(34))
Do While Not oExec.StdOut.AtEndOfStream
str = oExec.StdOut.ReadAll
set oExec = nothing
remaincount = GetWorkingFolder (foldspec +"\"+sf.name, _
remaincount, firsttime, spacer)
set fso = nothing
GetWorkingFolder = foldcount - 1