powershell compress-archive文件大小问题

时间:2015-08-19 19:10:11

标签: powershell

我在PowerShell中遇到了Compress-Archive Command的问题。似乎一旦它从中拉出的目录的文件大小超过20 GB,它就会返回错误。

Compress-Archive -Path Z:\from\* -CompressionLevel Optimal -DestinationPath Z:\To\test.zip

如果from的文件夹大小小于20GB,则此命令可以正常工作。如果它的大小超过20GB,我会收到以下错误

  

Remove-Item:找不到路径'Z:\ To \ test.Zip',因为它没有   存在。

     

Test-Path:指定的通配符模式无效:

是否有限制在微软网站上没有注明?

注意:我在Windows 10上

1 个答案:

答案 0 :(得分:0)

我建议你使用powershell并调用一个性能更高的程序,如7zip,winrar或其他。你可以用大文件获得更好的结果。

您可以参考这篇文章了解替代方案:

How to create a zip archive with PowerShell?