I was trying to make a program that zips a folder but I keep getting a NullReferenceException and it does not create the required zip file. Have I forgot something? I am using Shell32 and the zip sub comes from a codeproject tutorial. Anyways, here is the code:
Imports System.IO
Imports Shell32
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Hide()
Me.ShowInTaskbar = False
Zip()
End Sub
Sub Zip()
Dim sc As New Shell32.Shell()
Dim input As Shell32.Folder = sc.NameSpace("C:\minercraft v2.0\")
Dim output As Shell32.Folder = sc.NameSpace("C:\minercraft v2.0\backup.zip")
output.CopyHere(input.Items, 4)
End Sub
End Class