var zipFile = new Zipper(zipFileName); zipFile.CompressFile(FolderTextBox.Text);
MessageBox.Show("You folder has been zipped.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
var fileList = zipFile.ListArchive(zipFileName);
FileListBox.Items.AddRange(fileList.ToArray()); }
Let's press F5 and test our code. Your output should look like this:
Let's click the Browse... button and navigate to a folder:
Click OK. Now, the folder will be compressed and the output file will be result.zip.
Click OK.
Now you will see the list of files in the compressed ZIP file:
Let's browse to the folder selected using Windows Explorer and have a look (you can copy and paste the path from the textbox in the application itself):
Double-click on the file and you will see that the content of the ZIP file matches the list we had in step 29: