-1

I have an problem and I need help , I want to get all files in Temp directory . Im using this code but it doesn't work at all :| It doesn't get files from folders. I appreciate any help :)

    For Each File In Directory.GetFiles("C:\Windows\Temp")
        MsgBox(File)
    Next
HolyRandom
  • 79
  • 1
  • 11

1 Answers1

1

Change your code to include searching in subfolders. See MSDN for all info on GetFiles and SearchOption.

For Each File In Directory.GetFiles("C:\Windows\Temp", *, SearchOption.AllDirectories)
    MsgBox(File)
Next
Martin
  • 1,184
  • 8
  • 24