1

How do you change the name stored in the zip file?

Also, can this be done when adding the file via:

ZipFile zf = new ZipFile("path");
zf.BeginUpdate();
zf.Add(filePath);  <-- i would like to also be able to change it when adding
zf.CommitUpdate();
schmoopy
  • 6,419
  • 11
  • 54
  • 89

1 Answers1

4

Have you looked at the NameTransform property?

See SharpLibZip: Add file without path for an example of usage.

Update: Apparently, the latest version of SharpZipLib contains an overload for Add() that takes the filename.

Community
  • 1
  • 1
Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541