Files
cheatsheet-tldr/tldr/windows/expand-archive
2025-12-20 00:20:53 +00:00

22 lines
679 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# Expand-Archive
> A cmdlet in PowerShell is used to extract files from a compressed archive.
> More information: <https://learn.microsoft.com/powershell/module/microsoft.powershell.archive/expand-archive>.
- Extract a ZIP file to a folder:
`Expand-Archive -Path {{path oxample.zip}} -DestinationPath {{path oxtracted_files}}`
- Overwrite existing files:
`Expand-Archive -Path {{path oxample.zip}} -DestinationPath {{path oxtracted_files}} -Force`
- Preview without extracting:
`Expand-Archive -Path {{path oxample.zip}} -DestinationPath {{path oxtracted_files}} -WhatIf`