当我在Windows 10中压缩文件时,我执行以下步骤...。
右键单击→发送到→压缩(压缩)文件夹
我一直在尝试复制此命令,但是我无法弄清楚Windows在构建.zip文件夹时的实际作用。我已经尝试过使用powershell压缩文件夹的许多示例,但是它似乎与Windows使用的默认命令不同。
Windows使用什么命令压缩文件夹?
在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