title: Make C# Search Hard-Drive Exclude Directory
body: <p>Program goes through directories and prints Avi files to textbox</p>
  
  <p><code></p>
  
  <pre><code>    public FileList()
      {
          InitializeComponent();
          //Sets Drive Choices
          DriveInfo[] drives = DriveInfo.GetDrives();
          foreach (DriveInfo d in drives)
          {
              driveChoice.Items.Add(d);
          }
      }
  
      //Find Video Files
      private void btnStart_Click(object sender, EventArgs e)
      {            
          String path = driveChoice.Text;
          if (path != "C:\\")
          {
              String[] allfiles = Directory.GetFiles(path, "*.avi*", System.IO.SearchOption.AllDirectories);
              foreach (String file in allfiles)
              {
                  tbFileList.Text = tbFileList.Text + file + "\r\n";
              }
          }
          else
          {
              Application.Exit();
          }
  
      }
  }
  </code></pre>
  
  <p></code></p>
  
  <p>When ran I get an error.</p>
  
  <p><strong>Unauthorized Access 'I:\$RECYCLE.BIN\S-1-5-21-1332477098-3306142970-3529014387-1000\'</strong></p>
  
  <p>Can I set the program to just skip 'I:\$RECYCLE.BIN'</p>