title: IOException file already exists C#
body: <pre><code>private void btn_Backup_Click(object sender, EventArgs e)
      {
          List&lt;DirectoryInfo&gt; SourceDir = this.lbox_Sources.Items.Cast&lt;DirectoryInfo&gt;().ToList();
          string TargetDir = this.tbox_Target.Text;
  
          foreach (DirectoryInfo directory in SourceDir)
          {
              foreach (var file in directory.GetFiles())
                  if (this.checkbox_zipfiles.Checked == true)
                  {
                      System.IO.Compression.ZipFile.CreateFromDirectory(directory.FullName, TargetDir + @"\test.zip");
                  }
                  else
                  {
                      Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(directory.FullName, TargetDir, true);
                  }
          }
      }
  </code></pre>
  
  <p>I'm creating a backup application and when I try to zip the files I need to backup it says: "The file 'C:\Users\Lada1208\Desktop\test\test.zip' already exists."
  even thought the folder is empty before so it's trying to create the test.zip file two times for some reason. Any idea why?</p>