0

ある ZipFile から別の ZipFile にファイルをコピーします。

なぜそんなに簡単ではないのですか?

' Copy files from b.zip to a.zip
Dim a As New ZipFile(CurDir() & "\a.zip")
Dim b As New ZipFile(CurDir() & "\b.zip")

a.BeginUpdate()

For Each c As ZipEntry In b
    a.Add(c) 'Error: ICSharpCode.SharpZipLib.Zip.ZipException - Entry cannot have any data
Next

a.CommitUpdate()
a.Close()

.NET 4.5 Visual Basic でhttps://github.com/icsharpcode/SharpZipLibライブラリを使用しています。

誰かヒントをくれませんか?

4

1 に答える 1

0

宛先のzipファイルがソースと同じ場合は、Zipファイル全体をコピーして名前を変更します.なぜファイルを1つずつ行うのか........

于 2013-02-23T04:27:51.663 に答える