Quantcast
Viewing all articles
Browse latest Browse all 14

Answer by cowlinator for Can you zip a file from the command prompt using ONLY Windows' built-in capability to zip files?

There is a single, simple cmd.exe command for this (through PowerShell v5.0+).

To zip:

powershell Compress-Archive -LiteralPath 'C:\mypath\testfile.txt' -DestinationPath "C:\mypath\Test.zip"

To unzip:

powershell Expand-Archive -LiteralPath "C:\mypath\Test.Zip" -DestinationPath "C:\mypath" -Force

Sources:

Special thanks to @Ramhound.


Viewing all articles
Browse latest Browse all 14

Trending Articles