减压Zip与创建Zip文档

压缩文档:

  

关于压缩等级:

Fastest 使用最快的压缩方法来减少处理时间;这可能会导致更大的文件大小。
NoCompression 不要压缩源文件。
Optimal 处理时间取决于文件大小。

#压缩级别设为最佳
Compress-Archive -Path .	emp* -DestinationPath .Compress_temp.zip -CompressionLevel Optimal
#更新之前的压缩文件
Compress-Archive -Path .	emp* -DestinationPath .Compress_temp.zip -CompressionLevel Optimal -Update
#也可以省略.zip后缀
Compress-Archive -Path .	emp* -DestinationPath .Compress -CompressionLevel Optimal

 减压文档:

Expand-Archive -LiteralPath C:Compress.zip -DestinationPath c:Temp_2
Expand-Archive -Path .Compress_temp.zip -DestinationPath temp_3
原文地址:https://www.cnblogs.com/feiyucha/p/10901936.html