use p7zip as file properties detector ?

  • RichRumble

    RichRumble - 2012-11-04

    I use windows COM/WMI for files on windows machines, I don't have anything for linux. It often knows the file type even without the proper extension, plus all the meta-data you see when looking at (advanced)properties. This might not be the same goal you have in mind.
    header("Content-Type: text/plain"); //
    $arrHeaders = array(284);  //XP Only has 40 or so possible meta-data types
    $objShell = new COM("Shell.Application");
    $objFolder = $objShell->Namespace('c:\temp');  //Change to suit the proper path
    for ($i=0; $i<=283; $i=$i+1) {
      $arrHeaders=$objFolder->GetDetailsOf($objFolder->Items, $i);
    foreach ($objFolder->Items as $strFileName) {
      for ($i=0; $i<=283; $i=$i+1) {
    Echo $i . "\t" . $arrHeaders . ": " . $objFolder->GetDetailsOf($strFileName, $i) . "\r\n";


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks