使用 Windows 11 从命令行压缩

Zip from command line with Windows 11

使用新 Windows 11 功能压缩文件的 cmd 工具是什么? (资源管理器默认使用的那个)。 我尝试了 zip、7zip、压缩...

谢谢

您的机器有 PowerShell。

来自cmd.exe:

powershell -NoLogo -NoProfile -Command Compress-Archive

从 PowerShell 控制台:

Compress-Archive

信息使用:

help Compress-Archive -Full

在较新的 Windows 10 上用于 zip 处理的 CMD 工具,因此我认为转移到 Win 11 的是 TAR,但它不是“资源管理器中默认使用的那个”,因为该系统内置功能一直存在,因为我认为,至少 XP"

Tar --help

列表使用Tar -tf file.zip

提取使用Tar -m -xf file.zip

压缩使用Tar -a -cf new.zip files

还有其他选项