Write-Zip throws exception on -Append

Topics: User Forum
Jan 21, 2013 at 6:46 PM

I'm developing a script to handle some backups by compressing several different directories, and I would like to put them all into the same .zip file.  The first Write-Zip creates the target file, and then successive calls use the -Append switch:

Write-Zip $SourceDir -IncludeEmptyDirectories -Append -OutputPath $Target

Each of these calls results in the following exception:

Write-Zip : Extra data extended Zip64 information length is invalid
At line:1 char:10
+ Write-Zip <<<< $SourceDir -IncludeEmptyDirectories -Append -OutputPath $Target
+ CategoryInfo : OpenError: (D:\Data\Data...21-11-14-17.zip:UnresolvedPscxPathImpl) [Write-Zip], ZipException
+ FullyQualifiedErrorId : ZipOpenFail,Pscx.Commands.IO.Compression.WriteZipCommand

Am I doing something wrong here? What do I check?

 

Thanks in advance!

Feb 8, 2013 at 12:43 AM
Did you have some news/solution?
I have the same issue.
Coordinator
Feb 9, 2013 at 2:21 AM
Well, I can duplicate the error. I'll try to take a look at it this weekend.
Aug 16, 2013 at 9:44 AM
Edited Aug 16, 2013 at 10:42 AM
Hi

I'm having a similar problem and wondered if there was a resolution?

As I proceed through each file with a foreach, at first the zip file doesn't exist, subsequect files are appended;


Write-Zip "$datfile" "$zipfile" -Quiet -FlattenPaths
Succeeds in writing file to zip

Write-Zip "$datfile" "$zipfile" -Append -FlattenPaths
Succeeds in writing file to zip but fails closing zip + FullyQualifiedErrorId : ZipCommitFail,Pscx.Commands.IO.Compression.WriteZipCommand

Write-Zip "$datfile" "$zipfile" -Append -FlattenPaths
Fails opening zip+ FullyQualifiedErrorId : ZipOpenFail,Pscx.Commands.IO.Compression.WriteZipCommand


Many thanks.
Oct 21, 2013 at 3:07 PM
Hi

I'm having a similar problem and wondered if there was a resolution?

TY
Nov 1, 2013 at 5:20 PM
I'm having exactly the same error. Using the -Append switch appends the correct file but destroys the rest of the archive. Anyone found a solution as yet?