web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Cup of Dev / Compress files and folders ...

Compress files and folders using sevenzipsharp and 7-Zip in C-Sharp

Morne Wolfaardt Profile Picture Morne Wolfaardt
Compressing files using 7-Zip and seven zip sharp (http://sevenzipsharp.codeplex.com/) is really easy. To get started you would need the 7-Zip DLL http://www.7-zip.org/download.html namespace Cupofdev { using System; using System.IO; using SevenZip; class Cupofdev { static void Main(string[] args) { // Set source and target folders string targetFolder = @"E:\CodeDumps"; string sourceCodeFolder = @"C:\Dev\Clients\cupofdev"; if (System.IO.Directory.Exists(targetFolder)) { // Specify where 7z.dll DLL is located SevenZipCompressor.SetLibraryPath(@"C:\Program Files\7 - Zip\7z.dll"); SevenZipCompressor sevenZipCompressor = new SevenZipCompressor(); sevenZipCompressor.

Comments

*This post is locked for comments