All Forums >> [Scripting] >> WSH & Client Side VBScript >> show permissions for files and folders Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Afternoon guys, Looking at trying to start a script to do afew things. The long term goals is to get the file size and permissions of all subfolders and files in a given folder and push it out to excell or a csv file.
Looking at the forums and google, i see plenty of information on doing the excell or csv file. But little to nothing on showing permissions, there is a bunch on setting permissions but nothing on just showing. I have googled the usual "vbscript showing permissions" and such with no result. I have also looked at and read abit about calcs and xcalcs it does not do what i need it to do. Unless i am wrong xcalcs will not show all files. The script needs to be able to list inheirted permissions if they are there. From what i've read doing anything with permissions is painful to say the least, but i am assuming there is a wmi function or way to do this. Any help or pointers to other posts that i may have missed is appreciated. Thanks guys for the help.
Thanks, I guess when i was testing i overlooked that part and didnt have the right flags set. Now the fun part to implment it. That shouldnt be too much of a problem to run the script, now just dealing with the output. For you vb kings i need some help. I've decided to go with outputing the results of the script to a CSV file the will be imported into excel. So my two questions are this how do i format the output into some variables and 2nd and most important the Xcalcs.vbs file should i just copy the code from that script into my script or should i refrence it? Thanks alot guys BTW heres the default format for the output of the xcalcs script.
************************************************************************** Directory: C:\Share Permissions: Type Username Permissions Inheritance Allowed BUILTIN\Administrators Full Control This Folder, Subfolde Allowed NT AUTHORITY\SYSTEM Full Control This Folder, Subfolde Allowed Domain\azimzores Full Control This Folder Only Allowed \CREATOR OWNER Special (Unknown) Subfolders and Files Allowed BUILTIN\Users Read and Execute This Folder, Subfolde Allowed BUILTIN\Users Advanced (Create Fold This Folder and Subfo Allowed BUILTIN\Users Advanced (Create File This Folder and Subfo No Auditing set Owner: Domain\azimzores **************************************************************************