Extract files from a zip into a jar archive
<p>I have a little problem!
I work on a Selfmade Minecraft launcher in c# with the DotNetZip Library.
So, this Launcher has an Option for update that it downloads a .zip from a server and should extract all files from the zip into the minecraft.jar! but an error states "The file already exist" or it create's a folder called minecraft.jar......
Is there a possible way to extract files from a zip archive directly into a other zip archive? (Because a .jar is nearly the same as a .zip)
here is the download and extraxt code(dont wonder bout some texts's which are in german):</p>

<pre><code>private void button3_Click(object sender, EventArgs e)
{
    progressBar1.Visible = true; //Dient nur zur Deko
    label1.Text = "Download......";
    WebClient webClient = new WebClient();
    webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
    webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
    webClient.DownloadFileAsync(new Uri("https://dl.dropbox.com/u/97421059/Test.zip"), @"Test.zip"); //Der Link sollte für die Zukünftigen Versionen immer gleich sein!
    button3.Visible = false;

}


private void Completed(object sender, AsyncCompletedEventArgs e)
{
    label1.Text = "Entpacken....."; //In der Box
    progressBar1.Visible = false;
    button3.Visible = true;
    MessageBox.Show("Download abgeschlossen!!\n\rBitte warte bis der Launcher die Dateien entpackt hat."); // Erklärt sich von selbst
    string ExistingZipFile = @"Test.zip";
    string sourceDir = AppDomain.CurrentDomain.BaseDirectory;
    string TargetDirectory = (sourceDir + "minecraft.jar");
    using (ZipFile zip = ZipFile.Read(ExistingZipFile))
    {


        // ab hier komm der restliche script
        // bei dem man eig. nix einstellen soll 
        foreach (ZipEntry ze in zip)
        {
            ze.Extract(TargetDirectory, ExtractExistingFileAction.OverwriteSilently);

        }
        MessageBox.Show("Entpacken der Dateien abgeschlossen!");
        label1.Text = "Entpacken abgeschlossen!";
    }


} 
</code></pre>

<p>After i pasted GemHunter1 Code(i hope i filled the names in the right position) i have no errors, but in the minecraft.jar is still nothing from the downloadet zip</p>

<pre><code>private void Completed(object sender, AsyncCompletedEventArgs e)
{
    label1.Text = "Entpacken....."; //In der Box
    progressBar1.Visible = false;
    button3.Visible = true;
    MessageBox.Show("Download abgeschlossen!!\n\rBitte warte bis der Launcher die Dateien entpackt hat."); // Erklärt sich von selbst
    string ExistingZipFile = @"Test.zip";
    string sourceDir = AppDomain.CurrentDomain.BaseDirectory;
    string TargetDirectory = (sourceDir + "minecraft.jar");
    using (ZipFile zip = ZipFile.Read(ExistingZipFile))
    {


        // ab hier komm der restliche script
        // bei dem man eig. nix einstellen soll 
        if (zip.ContainsEntry("Test.zip"))
        {
            zip.RemoveEntry("Test.zip");
        }
        MessageBox.Show("Entpacken der Dateien abgeschlossen!");
        label1.Text = "Entpacken abgeschlossen!";
    }


}
</code></pre>
