News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!

Main Menu

The parent directory

Started by nandagopal, Feb 18, 2009, 09:38 PM

Previous topic - Next topic

nandagopal

When it finishes, the program displays a list of the subdirectories it compressed.


Private Sub btnZip_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles btnZip.Click
    Dim di As New DirectoryInfo(txtFolder.Text)
    Dim txt As String = ""

    For Each sub_di As DirectoryInfo In di.GetDirectories()
        Dim file_name As String = sub_di.FullName & ".zip"
        Using cf As New CompressedFolder(file_name)
            txt &= vbCrLf & sub_di.FullName
            cf.CompressFile(sub_di.FullName)
        End Using
    Next sub_di

    txtFolders.Text = txt.Substring(vbCrLf.Length)
End Sub