views:

20

answers:

0

when i use winrar to zip a file, it for some reason zips the entire path. I am using vb.net for doing this. here's the code -

  Public Sub RunArchive()
        Dim p As System.Diagnostics.Process = New System.Diagnostics.Process()
        sPath = "C:\Users\images\"
        sArchive = "C:\Users\images\test"

        p.StartInfo.FileName = ("C:\Program Files\WinRAR\rar.exe")
        p.StartInfo.Arguments = (" a -ms*.rar;*.zip;*.jpg;*.xls " & sArchive & ".rar " & sPath & "s23.jpg")
        p.Start()
        p.WaitForExit()
    End Sub

its zips to th specified folder, but when i try to unzip it, i see the whole path form users to images to s23.jog is in there. Why is that? I only need s23.jog in there when i unzip it not the preceding folders.