|
SelectQuery query = new SelectQuery ("select * from Win32_Directory WHERE Drive = 'F:'");
ManagementObjectSearcher searcher = new ManagementObjectSearcher (query);
foreach (ManagementBaseObject disk in searcher.Get ())
{
tn.Text = disk ["VolumeName"]. ToString () + "(" + disk ["Name"]. ToString () + ")";
}
Now use WMI's Win32_Directory to query all files under the F drive. But now I don't want to query all the paths I want to specify
select * from Win32_Directory WHERE Drive = 'F:' and Path = '\\Documents and Settings\\' so that nothing can be queried. . Expert advice! !! !! |
|