how to check a folder already exists before extracting from zip file to a specific location?
<pre><code>$zipfile = 'zipfilename';
$extractpath= 'C:\extract';

$zip = new ZipArchive();  

if ($zip-&gt;open($zipfile) !== TRUE) {
   die ("Could not open archive");
}
// extract contents to destination directory
$zip-&gt;extractTo($extractpath);
</code></pre>

<p>How to avoid overwriting a folder if it already exist?</p>
