list all files in a computer
Hi!
i want to list all the exe files in my computer. Is there any way you can do that?
i tried this code, but it only gives me the files in the directory.
Dim d() As String
Dim en As System.Collections.IEnumerator
Dim strDrive As String
Dim strFolder
For Each strDrive In Directory.GetLogicalDrives
Try
For Each strFolder In Directory.GetDirectories(strDrive)
d = System.IO.Directory.GetFiles(strFolder, "*.exe")
en = d.GetEnumerator
While en.MoveNext
Console.WriteLine(CStr(en.Current))
End While
Next
Catch
End Try
Next
thanks.