Reputation: 151
So i have a zip file in a directory. This zip file contains different kind of files. When a user clicks on a button in my WPF application, the zip file needs to be updated.
It needs to check files from another zip file in another directory. If a file doesnt excist in the first zip file, it needs to copy that file from the other zip file to the new zip file.
i used the Ionic zip methode for this.
So far i just used the file.copy overwrite = true code. But when the zip file is 1gb+ it is taking very long because it just replaced the zip file.
does someone know how i can resolve this?
Greetings Thomas
UPDATE: this is the code i got so far:
private void getlocaldata()
{
string admindata = @"\\networklocation\test.zip";
string localPath = @"C:\finaldata\test.zip";
File.Copy(admindata, localPath, true);
}
Upvotes: 0
Views: 484
Reputation: 59
You can use the DotNetZip library.
Check the file in the zip :
zip["Readme.txt"] = null;
But anyway you must compress files again for changing zips password. You can find examples for that here.
Upvotes: 1