使用wmi,
system.management命名空间。

解决方案 »

  1.   

    You can use win API, it includes FindFirstFile ,FindNextFile,FindClose,GetLogicalDrives
    FileTime and WIN32_FIND_DATA and so on ;
    alternatively , the class of Directory in .NET also has these functions that you want,
    Directory.GetLogicalDrives()
             .GetDirectories()
             .GetFiles()
      

  2.   

    using System.IO;Directory.GetLogicalDrives()
    Directory.GetDirectories()
    Directory.GetFiles()