powershell 压缩
The ZIP file format reduces the size of files by compressing them into a single file. This process saves disk space, encrypts data, and makes it easy to share files with others. Here’s how to zip and unzip files using PowerShell.
ZIP文件格式通过将文件压缩为单个文件来减小文件的大小。 此过程可节省磁盘空间,加密数据并易于与他人共享文件。 这是使用PowerShell压缩和解压缩文件的方法。
如何使用PowerShell压缩文件 (How to Zip Files Using PowerShell)
Let’s start off by compressing some files into a ZIP file archive using the Compress-Archive cmdlet. It takes the path to any files you want to compress—multiple files are separated with a comma—and archives them in the destination you specify.
首先,使用Compress-Archive cmdlet将一些文件压缩为ZIP文件存档。 它使用您要压缩的任何文件的路径(多个文件用逗号分隔),并将它们存档在您指定的目标位置。
First, open PowerShell by searching for it from the Start menu and then typing in the following command, replacing <PathToFiles>
and <PathToDestination>
with the path to the files you want to compress and the name and folder you want it to go, respectively:
首先,通过从“开始”菜单中搜索PowerShell来打开PowerShell ,然后键入以下命令,将<PathToFiles>
和<PathToDestination>
替换为要压缩的文件的路径以及希