I don't think the -r -x -w or any of those will work for NTFS (they don't set permissions like that).
To capture the error (probably STDERR) use: open(OLDERR, ">&STDERR") or die $!; # backup filehandle open(STDERR, ">standard_errors") or die $!; # errors go here now ## do your stuff here open(STDERR, ">&OLDERR") or die $!; # restore filehandle __END__ You can use the same idea for STDOUT if you need to. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 4:12 PM To: [EMAIL PROTECTED] Subject: File::Find on Win32 -- Directory Permissions Denied I am trying to use File::Find module on Win NT 4.0 with Activestate Perl to find the directory sizes on a network share drive. If the individual directories are protected by Windows NTFS permissions, the File::Find module throws a warning message on STDOUT saying "Can't opendir(Z:/blahblah): Invalid Argument". I have two questions here. a) I am using formats and would like to output this information to a format handle rather than the default STDOUT. IS there a way to do it via File::Find? b) How would I detect those directories which cannot be opened in a Win32 OS? (-r, -R etc did not work for me). Am I missing an obvious thing, here? Thanks, Rex ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]