Tuesday, October 12, 2010

VB.NET Creating Zip File

 //Imports System.IO

Dim emptyZip As Byte() = {80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        Dim oApp As Object

        'Destination Zip File Name Here
        File.WriteAllBytes("c:\avs.zip", emptyZip)
        oApp = CreateObject("Shell.Application")

        'Source File Name
        oApp.Namespace("c:\avs.zip").CopyHere("c:\avs.mdb")
        MsgBox("Zipped..")

No comments: