<?
/*
 Directory of C:\Documents and Settings\Default User\SendTo
 
31/12/2003  12:07       <DIR>          .
31/12/2003  12:07       <DIR>          ..
31/12/2003  01:07                  129 3\uffff Floppy (A).lnk
31/12/2003  12:07                    0 Desktop (create shortcut).DeskLink
31/12/2003  12:07                    0 Mail Recipient.MAPIMail
31/12/2003  12:07                    0 My Documents.mydocs
               4 File(s)            129 bytes
*/

$in=fopen("php://stdin","r");
$out=fopen("php://stdout","w");
while (
$in && !feof($in) && $buf=fgets($in,4096)) {
    if (
preg_match('@^ Directory of (.+)$@'$buf$matches)) {
        
$dir=$matches[1];
    } else if (
preg_match('@(../../....)  (..:..) *([0-9,]+) (.+)$@'$buf$matches)) {
        echo 
$dir."\\".$matches[4]." <".$matches[1]." <".$matches[2]." <".str_replace(",","",$matches[3])."\n";
    }
}
fclose($in);
fclose($out);
?>