There are two methods, one takes an optional array of file extensions that you don't want to compress. The code's comments should hopefully explain everything. However, based on your requirements this should be a problem. The only downside of this code is that the maximum byte threshold is calculated based on the uncompressed file length because the compressed size isn't known until later. It walks a given folder, adds files to a zip file, and creates new zip files once a maximum byte threshold is reached. Net 4.5 and you need to add a reference to both System.IO.Compression and System.IO.Compression.FileSystem in your project. ![]() Net runtime actually has compression built into it and recent versions have made it even easier to us to use.įor the code below to work you need to have. Would you be open to a different solution that doesn't use WinZip at all? The. "
0 Comments
Leave a Reply. |