You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just tried this on a 3.7GB file and it cuts the original file short as the CopyTo has the same Stream was too long issue. The archive completes but only with 2GB of the original file.
I found this module in hopes of solving a strange case where I've only got remote PowerShell access to a server and I need to compress some big log files. I don't have enough free space to compress the entire folder, so my plan was to add a few files at a time to the archive.
Unfortunately, I'm getting the usual "Stream was too long" error when using -Update. Note that I don't have a problem when creating a new archive - it only seems to happen with -Update.
This was with PSCompression 1.0.4 from PSGallery and PowerShell 5.1.17763.2931.
Hopefully the output above tells the story, but let me know what I can do to help.
Thanks!
The text was updated successfully, but these errors were encountered:
Seems like this is simply not possible using ZipArchive class unfortunately, at least for me if the Zip is a new one I can compress files no matter their size @ssilvidi. Might need to find other way to do this, either use an external program (7-zip or other) or instead of appending to an existing Zip File create new ones.
I was able to make it work in my scenario by creating separate archives in a few steps. Like you said, creating new files worked for me regardless of the size.
Running into the same issue as referenced here: PowerShell/Microsoft.PowerShell.Archive#19 (comment)
I found this module in hopes of solving a strange case where I've only got remote PowerShell access to a server and I need to compress some big log files. I don't have enough free space to compress the entire folder, so my plan was to add a few files at a time to the archive.
Unfortunately, I'm getting the usual "Stream was too long" error when using
-Update
. Note that I don't have a problem when creating a new archive - it only seems to happen with-Update
.This was with PSCompression 1.0.4 from PSGallery and PowerShell 5.1.17763.2931.
Hopefully the output above tells the story, but let me know what I can do to help.
Thanks!
The text was updated successfully, but these errors were encountered: