1

I'm trying to unzip a folder with 7Zip, which works nicely. Unfortunately, 7Zip does not delete unnecessary files that may already be in the Folder . For zipping, there is the option u -uq0 to synchronize the zip, is that also available when unpacking? I haven't managed to get it running this way.

I tried this:

startInfo.Arguments = $"x -y \"{sourcefilePath}\" -o\"{Settings.Default.Local_ProjektPath}{supDirName}\"   "; // Befehl zum Entpacken der Datei

This code will unzip the folder and overwrite all previous files, but will not delete unnecessary files in the folder.

I also thought of simply deleting the folder beforehand, but this is only a stopgap solution, since they are large folders and they have attributes that make it difficult to delete

1
  • 1
    I suspect the answer is it doesn't support that, and you'll need to e.g. get the folder listing from the zip yourself, look at the existing files in the folder and remove the extra files yourself.
    – Rup
    Commented Aug 5 at 9:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.