压缩文件夹时Windows默认命令是什么?

问题描述 投票:1回答:1

当我在Windows 10中压缩文件时,我执行以下步骤...。

右键单击→发送到→压缩(压缩)文件夹

我一直在尝试复制此命令,但是我无法弄清楚Windows在构建.zip文件夹时的实际作用。我已经尝试过使用powershell压缩文件夹的许多示例,但是它似乎与Windows使用的默认命令不同。

Windows使用什么命令压缩文件夹?

windows batch-file zip
1个回答
0
投票

在powershell中,您可以使用Compress-Archive -Path input.txt -DestinationPath output.zip或仅使用Compress-Archive input.txt output.zip,其中input.txt也可以是文件夹。要从Windows命令提示符调用此命令,请使用powershell Compress-Archive input.txt output.zip

© www.soinside.com 2019 - 2024. All rights reserved.