Posted by ImOk on 06/08/06 16:37
WHen I run this under Windows I get the Count of drives but then I get
an error message on the Reset() when I try to enumerate. Does this work
for anyone?
$fs = new COM("Scripting.FileSystemObject");
$drives = $fs->Drives;
echo $drives->Count;
$drives->Reset();
while($drive = $drives->Next()) {
echo $drive->VolumeName;
}
2PHP Stack trace: PHP 1. {main}() C:\PHP5Apps\PHPX\fso.php:0 PHP Fatal
error: Call to undefined method variant::Reset() in
C:\PHP5Apps\PHPX\fso.php on line 5
[Back to original message]
|