Dim objShell strFile="e:\temp\test.txt" strCmd="Cacls " & strFile Set objShell=CreateObject("WScript.shell") Set objExec=objShell.Exec(strCmd) WScript.Echo "File information for " & UCase(strFile) WScript.Echo "Permissions:" do While objExec.StdOut.AtEndOfStream <>True strData=objExec.StdOut.Readline 'strip out filename from output If InStr(1,strData,strFile,vbTextCompare) Then strData=Replace(strData,strFile,"",1,vbTextCompare) End If 'Replace permission abbreviations strData=Replace(strData,":R",vbTab & "READ-ONLY") strData=Replace(strData,":C",vbTab & "CHANGE") strData=Replace(strData,":F",vbTab & "FULL-CONTROL") strData=Replace(strData,":W",vbTab & "WRITE") strData=Replace(strData,":N",vbTab & "NONE") WScript.Echo Trim(strData) Loop 'get attributes strCmd="Attrib " & strFile Set objExec=objShell.Exec(strCmd) WScript.Echo "Attributes:" do While objExec.StdOut.AtEndOfStream <>True strData=objExec.StdOut.Readline 'strip out filename from output strData=Left(strData,Len(strData)-Len(strFile)) 'Replace attribute abbreviations If InStr(strData,"A") Then strResults=strResults & ",Archive" If InStr(strData,"S") Then strResults=strResults & ",System" If InStr(strData,"H") Then strResults=strResults & ",Hidden" If InStr(strData,"R") Then strResults=strResults & ",ReadOnly" Loop 'strip off leading , WScript.Echo Mid(strResults,2)