如何使用Windows的内置功能从命令提示符进行拉链或解压缩? [英] How can you zip or unzip from the command prompt using ONLY Windows' built-in capabilities?

查看:516
本文介绍了如何使用Windows的内置功能从命令提示符进行拉链或解压缩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows中,您可以:

按右键 - >发送到 - >压缩(压缩)文件夹进行压缩

然后双击zip文件

In Windows you can:
Zip by "right click --> send to --> Compressed (zipped) folder"
And unzip by double clicking on the zip file and copy the files out.

有没有办法从命令行应用这些能力,而无需安装任何第三方?

Is there a way to apply those abilities from the command line without the need to install any 3rd party?

推荐答案

回到2013年,这是不可能的。 MS没有为此提供可执行文件。

Back in 2013, that was not possible. MS provided no executable for this.

请参阅此链接了解有关VBS的一些操作。
http://superuser.com/questions/201371/ create-zip-folder-from-the-command-line-windows

See this link for some VBS way to do this. http://superuser.com/questions/201371/create-zip-folder-from-the-command-line-windows

从Windows 8开始,默认安装.Net Framework 4.5, a href =https://msdn.microsoft.com/en-us/library/system.io.compression.ziparchive(v=vs.110).aspx> System.IO.Compression.ZipArchive 和PowerShell可用,可以编写脚本来实现这一点,请参阅
http://stackoverflow.com/a/26843122/71312

From Windows 8 on, .Net Framework 4.5 is installed by default, with System.IO.Compression.ZipArchive and PowerShell available, one can write scripts to achieve this, see http://stackoverflow.com/a/26843122/71312

这篇关于如何使用Windows的内置功能从命令提示符进行拉链或解压缩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆