<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=Windows-1252"> <TITLE>-o (set Output directory) switch</TITLE> <LINK href="style.css" rel="stylesheet" type="text/css"> </HEAD> <BODY> <H1>-o (set Output directory) switch</H1> <P>Specifies a destination directory where files are to be extracted.</P> <P>This switch can be used only with extraction commands.</P> <H4>Syntax</H4> <PRE class="syntax"> -o{dir_path} </PRE> <DL> <DT>{dir_path}</DT> <DD>This is the destination directory path. It's not required to end with a backslash. If you specify <B>*</B> in {dir_path}, 7-Zip substitutes that * character to archive name.</DD> </DL> <H4>Example</H4> <PRE class="example"> 7z x archive.zip -oc:\Doc </PRE> <P>extracts all files from the <SPAN class="filename">archive.zip</SPAN> archive to the <SPAN class="filename">c:\Doc</SPAN> directory.</P> <PRE class="example"> 7z x *.zip -o* </PRE> <P>extracts all <SPAN class="filename">*.zip</SPAN> archives to subfolders with names of these archives.</P> <H4>Commands that can be used with this switch</H4> <P> <A href="../commands/extract.htm">e (Extract)</A>, <A href="../commands/extract_full.htm">x (Extract with full paths)</A> </P> </BODY> </HTML>