Write-Zip throws exception on -Append

Topics: User Forum
Jan 21, 2013 at 5: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 7, 2013 at 11:43 PM
Did you have some news/solution?
I have the same issue.
Feb 9, 2013 at 1:21 AM
Well, I can duplicate the error. I'll try to take a look at it this weekend.
Aug 16, 2013 at 8:44 AM
Edited Aug 16, 2013 at 9:42 AM

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 2:07 PM

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

Nov 1, 2013 at 4: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?
Wed at 5:31 PM
I too am having this same type of issue with exactly what was described by decomeau above almost 18 months ago. The only major difference is am I am not using the -FlattenPaths command. The archive looks perfect, but when you try to unzip or append more files, it is all corrupted. Any updates or suggestions to solve the issue?