Click here to Skip to main content
16,013,516 members
Home / Discussions / C#
   

C#

 
GeneralRe: Display each Form from an arraylist of Form names Pin
Prash30-Apr-02 20:02
Prash30-Apr-02 20:02 
GeneralDataBinding Pin
Mazdak30-Apr-02 5:23
Mazdak30-Apr-02 5:23 
GeneralSearching an entire hard drive for a file Pin
kyledunn30-Apr-02 1:10
kyledunn30-Apr-02 1:10 
GeneralRe: Searching an entire hard drive for a file Pin
Nick Parker30-Apr-02 1:35
protectorNick Parker30-Apr-02 1:35 
GeneralRe: Searching an entire hard drive for a file Pin
kyledunn30-Apr-02 1:56
kyledunn30-Apr-02 1:56 
GeneralRe: Searching an entire hard drive for a file Pin
James T. Johnson30-Apr-02 2:47
James T. Johnson30-Apr-02 2:47 
GeneralRe: Searching an entire hard drive for a file Pin
Nick Parker30-Apr-02 2:50
protectorNick Parker30-Apr-02 2:50 
GeneralRe: Searching an entire hard drive for a file Pin
kyledunn30-Apr-02 6:45
kyledunn30-Apr-02 6:45 
Thanks guys,

Here is an approach that works well.

Kyle

using System.Management;

string drive = "\"c:\"";
string filename = "\"test\"" ;
string extension = "\"exe\"";
string qry = String.Format( "select * from cim_logicalfile where drive={0} and filename={1} and extension={2}", drive, filename, extension);
ManagementObjectSearcher query = new ManagementObjectSearcher(qry); ManagementObjectCollection queryCollection = query.Get();
foreach(ManagementObject mo in queryCollection)
{
Console.WriteLine( "Name '{0}' :Path: '{1}' ",mo["Name"], mo["Path"]);
}

[Edit: The : P shows up as a smily face. Although I am happy with this result the smily face was unintentional. ]
GeneralXP Explorer Side Bar Pin
Jeremy Fuller30-Apr-02 0:20
Jeremy Fuller30-Apr-02 0:20 
GeneralSkinnable Winforms Pin
29-Apr-02 18:16
suss29-Apr-02 18:16 
QuestionDHTML Edit control. How can I use this thing? Pin
lovehis29-Apr-02 17:06
lovehis29-Apr-02 17:06 
Generaluser control in Winforms Pin
29-Apr-02 11:46
suss29-Apr-02 11:46 
GeneralRe: user control in Winforms Pin
Nish Nishant29-Apr-02 14:32
sitebuilderNish Nishant29-Apr-02 14:32 
GeneralRe: user control in Winforms Pin
Rickard Andersson2029-Apr-02 20:44
Rickard Andersson2029-Apr-02 20:44 
GeneralRe: user control in Winforms Pin
Neil Van Note29-Apr-02 20:56
Neil Van Note29-Apr-02 20:56 
GeneralRe: user control in Winforms Pin
30-Apr-02 4:27
suss30-Apr-02 4:27 
GeneralRe: user control in Winforms Pin
James T. Johnson30-Apr-02 4:40
James T. Johnson30-Apr-02 4:40 
GeneralRe: user control in Winforms Pin
30-Apr-02 11:35
suss30-Apr-02 11:35 
GeneralSocket and ReadCallback Pin
Szymon Pusz29-Apr-02 11:42
Szymon Pusz29-Apr-02 11:42 
GeneralFloat performance in C# Pin
29-Apr-02 11:03
suss29-Apr-02 11:03 
GeneralRe: Float performance in C# Pin
Neil Van Note29-Apr-02 21:08
Neil Van Note29-Apr-02 21:08 
GeneralEvent Question Pin
Sabran29-Apr-02 10:53
Sabran29-Apr-02 10:53 
GeneralDrawing over the controls Pin
Zombies with Coffee, LLC29-Apr-02 10:22
professionalZombies with Coffee, LLC29-Apr-02 10:22 
GeneralResource Problems! Pin
Derek Price29-Apr-02 6:21
Derek Price29-Apr-02 6:21 
GeneralRe: Resource Problems! Pin
James T. Johnson29-Apr-02 9:51
James T. Johnson29-Apr-02 9:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.