All pastes #83478 Raw Edit

Ex0r

public text v1 · immutable
#83478 ·published 2006-07-09 21:06 UTC
rendered paste body
  GNU nano 1.3.10                             File: snes.php

<?php

$handle = opendir('/home/justin/Desktop/Archives');

while (false !== ($file = readdir($handle))) {
        $path = pathinfo($file);
        if ($path['extension'] == html) {
                $base = substr($file, 0, -5);
                $name = strtok($base,'(');
                $final = substr($name, 0, -1);
                #echo "Adding $file to archive $final.7z<br>";
                $go = escapeshellarg("$final.7z $file");
                echo $go;
                #system("7z\ a".$go,$output) or die("There was an error! ".$output);
        }
}
?>