objFile properties

Posted on 2005-05-04
Last Modified: 2012-06-21
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?


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

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strSrvName & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery ("Select * from CIM_DataFile")
  For Each objFile in colFiles
    end if
Question by:sirbounty
    1 Comment
    LVL 4

    Accepted Solution

    these are all the methods and properties of the CIM_DataFile:

    You can check here - if you download the wmi tools, you get a WMI browser which will let you run queries and see what values *all* the properties have so you can find what you need. (


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now