Hi Gurus,
I am trying to use Perl to find files with a particular extension (*.bat) on
remote machines on our network.
I'm running Windows NT 4.0. I'm using ActivePerl v5.6.1 Build 626 May
2,2001.
This is the script I got after running find2perl with the unix find
specification and redirecting the output to a file:
#! D:\Perl\bin\perl.exe -w
eval 'exec D:\Perl\bin\perl.exe -S $0 ${1+"$@"}'
if 0; #$running_under_some_shell
use strict;
use File::Find ();
# Set the variable $File::Find::dont_use_nlink if you're using AFS,
# since AFS cheats.
# for the convenience of &wanted calls, including -eval statements:
use vars qw/*name *dir *prune/;
*name = *File::Find::name;
*dir = *File::Find::dir;
*prune = *File::Find::prune;
# Traverse desired filesystems
File::Find::find({wanted => \&wanted}, '\\\\testdbmonitor/c$');
exit;
sub wanted {
/^.*\.bat\z/s;
}
When I executed it, no output resulted and after about 30 seconds the
command prompt was returned. Definately the remote machine I was searching
has lots of .bat files.
Please help!
Thanks in advance,
Denmark Weatherburne
"Knowledge is power, but it is only useful if it is shared!"
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Denmark Weatherburne
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).