'file_info.vbs - print out information about boot.ini Option Explicit Dim refFile Set refFile = GetObject("winMgmts:CIM_DataFile.Name='c:\boot.ini'") WScript.echo "Information about " & refFile.Name With refFile WScript.echo "Name: " & .Name WScript.echo "Size: " & .FileSize WScript.echo "Created on " & GetVBDate(.CreationDate) WScript.echo "Last modified on " & GetVBDate(.LastModified) WScript.echo "Last accessed on " & GetVBDate(.LastAccessed) WScript.echo "Short filename: " & .EightDotThreeFileName WScript.echo "Filetype: " & .FileType WScript.echo "Extension: " & .Extension WScript.echo "Path: " & .Path WScript.echo "Drive: " & .Drive If .Archive then WScript.echo "Archive bit set" If .Hidden then WScript.echo "File is hidden" If .System then WScript.echo "System File" If .Compressed then WScript.echo "Compressed with " & .CompressionMethod If .Encrypted then WScript.echo "Encrypted with " & .EncryptionMethod If .Readable then WScript.echo "You may read this file" Else WScript.echo "You may not read this file." End If If .Writeable then WScript.echo "You may write to this file" Else WScript.echo "You may not write to this file" End If End With Set refFile = Nothing 'Don't forget to include this function... Function GetVBDate(wd) GetVBDate = DateSerial(left(wd,4),mid(wd,5,2),mid(wd,7,2)) _ + TimeSerial(mid(wd,9,2),mid(wd,11,2),mid(wd,13,2)) End Function