Link to home
Start Free TrialLog in
Avatar of sirbounty
sirbountyFlag for United States of America

asked on

objFile properties

I have some code that scans a drive and reports back information on the file if it fits my criteria.

I'd like to be able to identify what other properties are available to me for the given file, so as to hopefully determin if there is a way to do a comparison with other file(s) found elsewhere with the same name.  For instance, below I'm referencing the file name and size.  Is there any other attribute that might contain a unique value that I can retrieve and compare?

====code======

Set objFSO = CreateObject("Scripting.FileSystemObject")
strComputer = "."
set objWMIService=GetObject("WinMgmts:{impersonationlevel=impersonate}!\\" & strComputer & "\root\cimv2")

set colSettings=objWMIService.ExecQuery ("Select * From Win32_ComputerSystem")
For each objComputer in colSettings
  strSrvName = objComputer.Name
Next

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strSrvName & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery ("Select * from CIM_DataFile")
  For Each objFile in colFiles
       'objFile.Name
       'objFile.FileSize
    end if
  Next
ASKER CERTIFIED SOLUTION
Avatar of armeen
armeen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial