Filesystem Basics

At its most basic, a filesystem is quite simply a collection of files, hierarchically organized into folders (or directories). It should come as no surprise, then, that two fundamental classes of WMI objects represent a filesystem. One represents a file, and the other represents a directory.

Properties of Files

A file is represented in WMI by a CIM_DataFile object. Every single file on a Windows 2000 system is represented by one of these objects. Each such object can be identified uniquely by its primary key. The primary key of a CIM_DataFile is its Name property. Unsurprisingly, the value of this property is the fully-qualified path to the file being represented. For example, the CIM_DataFile object representing boot.ini, ...

Get Windows Management Instrumentation (WMI) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.