David, under each of these suddirs, I need all the eml files deleted but there are thousands of them and the actual file name is "training 2001.eml" so my questions still remain,
Can I have this search recursively down under all the pc#### subdir names? Can I create a scalar like "/home/emstat/win32/backup/012004155140/pc*" so it will store all the pc subdirs? Can I use reg exp such as a range of pc80[0-9] pc13[0-9] ? Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams 614-566-4145 "Wagner, David --- Senior Programmer Analyst --- WGO" <[EMAIL PROTECTED]> 02/16/2004 06:02 PM To: <[EMAIL PROTECTED]>, "Perl Beginners" <[EMAIL PROTECTED]> cc: Subject: RE: another directory search, yet many subdirs [EMAIL PROTECTED] wrote: > People of the Perl, > > I am in need of some help! Here is the info you need for my samba > mount points. > > directories: ~emstat/win32/backup/012004155140/pc*, > ~emstat/win32/backup/01210415175/pc*, ~emstat/win32/pc* > files: under each of these subdirs, pc[#####], I have "training > 2001.eml" files ( NOTE THE SPACE ) that I need deleted! > so far this is what I have for my perl program > > /usr/bin/perl -w > use strict; > > # Open dirs and search for string > > $emdir="/home/emstat/win32/backup/012004155140"; > $emdir2="/home/emstat/win32/backup/012104151751"; > $emdir3= > opendir(DEREK, "$emdir") > || die "cannot open directory $!"; > opendir(SMITH, "$emdir2") > || die "cannot open directory $!"; > > while (defined ($readdir = DEREK)) > > > My questions are how can I have this search recursively down under > all the pc#### subdir names? > Can I create a scalar like > "/home/emstat/win32/backup/012004155140/pc*" so it will store all the > pc subdirs? > Can I use reg exp such as a range of pc80[0-9] pc13[0-9] ? It si not clear in my mind the setup you have. The process you want to use is probably File::Find which comes as standard portion of all Perl installs. If I could picture the setup in my mind, I could give you a better picture of what to do. Sorry. Wags ;) > > please help! > > thank you, > > > > Derek B. Smith > OhioHealth IT > UNIX / TSM / EDM Teams ********************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ****************************************************************