开发者

zip files, zips the entire path

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜