I am trying to remove all files on my storage card without removing one. I can keep the directory I specify but not its contents with my current code. It just leaves the blank 
folder data because it removes everything inside. How can I keep it from removing that folder and its contents?

```
private void button1_Click(object sender, EventArgs e)
{
   ScanDirectory scanDirectory = new ScanDirectory();
   scanDirectory.WalkDirectory(@"/Storage Card");
   scanDirectory.WalkDirectory(@"/Application");
}

public class ScanDirectory
{
   public void WalkDirectory(string directory)
   {
      WalkDirectory(new DirectoryInfo(directory));
   }

   private static void WalkDirectory(DirectoryInfo directory)
   {
      // Scan all files in the current path
      foreach (FileInfo file in directory.GetFiles())
      {
         file.Attributes &= ~FileAttributes.ReadOnly;

         var name = file.Name;
         name = name.ToLower();
         if (name != "test.txt")
         {
            file.Delete();
         }
      }
      DirectoryInfo[] subDirectories = directory.GetDirectories();
      foreach (DirectoryInfo subDirectory in subDirectories)
      {
         WalkDirectory(subDirectory);
         subDirectory.Attributes &= ~FileAttributes.ReadOnly;

         var name = subDirectory.Name;
         name = name.ToLower();
         if (name != "data")
         {
            subDirectory.Delete();
         }
      }
   }
}    

```