7-Zip

7-Zip: 7z x archive.7z -o.\output — Windows

Extract an archive to a destination directory.

Availability: Third-party software; install and version dependent.中文

Syntax

7z x archive.7z -o.\output

Examples

Extract an archive to a destination directory.

7z x archive.7z -o.\output

Parameters, options and clauses

Option / clauseDescription
x <archive>Extract while preserving paths.
-o<directory>Set the output directory; no space follows -o.
-yAssume yes for prompts.
-aoa / -aos / -aou / -aotChoose how extracted files interact with existing files.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory