'========================================================================== ' ' VBScript Source File -- ' ' NAME: ' ' AUTHOR: ed wilson , mred ' DATE : 4/6/2006 'Version 2.0 Complete re-wrote function ' COMMENT: ' '========================================================================== Option Explicit On Error Resume Next Dim objFSO Dim objFile Dim Target Target = "C:\fso\test.txt" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.GetFile(Target) WScript.Echo "The file is: " & target WScript.Echo "bitmap number is: " & objFile.Attributes & _ " " & funAttrib(objFile.attributes) Function funAttrib(intMask) Dim strAttrib If IntMask = 0 Then strAttrib = "No attributes" If intMask And 1 Then strAttrib = strAttrib & "Read Only, " If intMask And 2 Then strAttrib = strAttrib & "Hidden, " If intMask And 4 Then strAttrib = strAttrib & "System, " If intMask And 8 Then strAttrib = strAttrib & "Volume, " If intMask And 16 Then strAttrib = strAttrib & "Directory, " If intMask And 32 Then strAttrib = strAttrib & "Archive, " If intMask And 64 Then strAttrib = strAttrib & "Alias, " If intMask And 2048 Then strAttrib = strAttrib & "Compressed, " funAttrib = strAttrib End Function