-o (set Output directory) switch

7-Zip 15.14

-o (set Output directory) switch

Specifies a destination directory where files are to be extracted.

This switch can be used only with extraction commands.

Syntax

-o{dir_path}
{dir_path}
This is the destination directory path. It's not required to end with a backslash. If you specify * in {dir_path}, 7-Zip substitutes that * character to archive name.

Example

7z x archive.zip -oc:\Doc

extracts all files from the archive.zip archive to the c:\Doc directory.

7z x *.zip -o*

extracts all *.zip archives to subfolders with names of these archives.

Commands that can be used with this switch

e (Extract), x (Extract with full paths)