How to scan entire drive using VB

I want to scan my entire C: drive (or any other drive), including all folders or subdirectories for an specific file type.  I am doing that already with the following code, but I am limited to only one folder that I can select:

Last = -1
    Image = Dir(DirSelect & "*.ICO")
    While Image <> ""
      Last = Last + 1
      If Last >= 0 Then frmImage.lstFileName.AddItem Image
      Image = Dir


DirSelect = PATH


Maybe an API will do it??

Who is Participating?
vmanoConnect With a Mentor Commented:
check out this MSDN article: Q185476. URL is: 

let me know if this helps
p1jar3Author Commented:
The information provided is very valuable.  I don't want to reject the question just because I have not test the code, but reading it looks like it will do what I need.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.