Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find a file.

Status
Not open for further replies.

LamarM

IS-IT--Management
Sep 19, 2000
4
US
I'm trying to write a script to search a bunch of machines, to find all .pst files and report back the machine name and , name of file and size of the file. I don't have a clue how to start, can someone help or point me in the right direction....Lamar
 
This is what I have so far, but it's not working.

use File::Find;
use LWP::Simple;
open (LOG,">>log.file") || die "can't open log file $!";
find(sub{/\.pst$/ )},qw(C: D: E:)};
print LOG "$File::Find::name\n";
}
close log

 
Latest and greatest to search local dirve.

use File::Find;
use LWP::Simple; {
open (LOG,">>log.file") || die "can't open log file $!";
find(sub{/\.pst$/},qw(C: D: E:));
print LOG "$File::Find::name\n";
}

close log
 
I now get this error. Any ideas.

Can't take log of 0 at D:\Download\find_pst.pl line 9.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top