Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails
Private Sub Zip(ByVal SourceFolder As String, ByVal DestFile As String) Dim DirFileNames() As String = Directory.GetFiles(SourceFolder, "*", SearchOption.AllDirectories) Dim objCrc32 As New Crc32() Dim zipStream As ZipOutputStream zipStream = New ZipOutputStream(File.Create(DestFile)) zipStream.SetLevel(9) Dim zFile As String For Each zFile In DirFileNames Dim zFileStream As FileStream = File.OpenRead(zFile) Dim zFileBuffer(zFileStream.Length - 1) As Byte Dim strSource As Integer = SourceFolder.Length + 1 zFileStream.Read(zFileBuffer, 0, zFileBuffer.Length) Dim objZipEntry As ZipEntry = New ZipEntry(zFile.Substring(strSource)) objZipEntry.DateTime = DateTime.Now objZipEntry.Size = zFileStream.Length zFileStream.Close() objCrc32.Reset() objCrc32.Update(zFileBuffer) objZipEntry.Crc = objCrc32.Value zipStream.PutNextEntry(objZipEntry) zipStream.Write(zFileBuffer, 0, zFileBuffer.Length) Next zipStream.Finish() zipStream.Close() End Sub
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
8 Experts available now in Live!