Compress-Archive
noun
say it: “kum-PRESS AR-kyve” /kəmˈprɛs ˈɑrkaɪv/
A PowerShell command that packs a folder or files into one zip file; -Path says what to pack and -DestinationPath names the zip.
What does Compress-Archive do?
Compress-Archive packs files or a folder into one zip file. -Path says what to pack and -DestinationPath names the zip. Packing a folder puts the folder itself in the zip; folder\* packs only what's inside it. It stops if the zip already exists, unless you add -Update or -Force.
Compress-Archive -Path photos -DestinationPath trip-photos.zip
In a sentence
- “Compress-Archive stopped because trip-photos.zip was already there.”
- “Sam packed the photos folder with Compress-Archive to send it to a friend.”
Level: Novice · More PowerShell terms at this level
Updated