Here's skeleton code that will visit every accessible file on every hard drive on the current system:
vb.net Code:
  1. Private Sub SearchComputer()
  2.     For Each drive As IO.DriveInfo In IO.DriveInfo.GetDrives()
  3.         If drive.DriveType = IO.DriveType.Fixed Then
  4.             SearchFolder(drive.Name)
  5.         End If
  6.     Next drive
  7. End Sub
  8.  
  9. Private Sub SearchFolder(ByVal folder As String)
  10.     Try
  11.         For Each subfolder As String In IO.Directory.GetDirectories(folder)
  12.             SearchFolder(subfolder)
  13.         Next subfolder
  14.  
  15.         For Each file As String In IO.Directory.GetFiles(folder)
  16.             'Do whatever is appropriate here with the file path.
  17.             Console.WriteLine(file)
  18.         Next file
  19.     Catch ex As UnauthorizedAccessException
  20.         'Ignore this folder as the user does not have permission to access it.
  21.     End Try
  22. End Sub