0

I have written some code in C#, however, it fails if my ZIP file is password protected otherwise extracts the file if there is no password protection.

Shell32.ShellClass sc = new Shell32.ShellClass();            
Shell32.Folder SrcFlder = sc.NameSpace("c:\\test1.zip");
Shell32.Folder DestFlder = sc.NameSpace("c:\\test");
Shell32.FolderItems items = SrcFlder.Items();
DestFlder.CopyHere(items,20);
mmk
  • 585
  • 5
  • 13
user948401
  • 31
  • 6

1 Answers1

-1

Use DotNetZip is a free open-source library for working with zip files. It supports password protected files so it should be just what you are after.

Please visit the post how to read a password protected zip file in c#

Community
  • 1
  • 1
vikas
  • 931
  • 6
  • 11