|
-
May 12th, 2004, 02:31 PM
#1
Thread Starter
Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|