On a windows xp machine, running the following code with active state
perl 5.8.8:
use Win32::File;
$dirspec = "c:\\xfer";
opendir(DS, $dirspec);
while($fn = readdir(DS))
{
if ( -d $fn)
{
print "$fn is a directory\n";
}
else
{
print "$fn is not a directory\n";
}
}
only . and .. are identified as directories, the other subfolders are not.
I then tried:
use Win32::File('GetAttributes');
$dirspec = "c:\\xfer";
opendir(DS, $dirspec);
while($fn = readdir(WS))
{
GetAttributes($fn,$attrib) or die "Cannot get attribs: $!";
print $attrib;
}
No error messages, but nothing prints. How would I read the attribute
flags?
Thanks,
Mark
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>