Re: Recursive Copy

2006-08-18 Thread anu p
John, "John W. Krahn" <[EMAIL PROTECTED]> wrote: [ Please do not top-post ] anu p wrote: > If you have some time to help me out ... You should post your questions to the mailing list instead of individual subscribers. > I tried a similar example of recursive copy using File::Find, Copy

Re: Recursive Copy

2006-08-18 Thread John W. Krahn
[ Please do not top-post ] anu p wrote: > If you have some time to help me out ... You should post your questions to the mailing list instead of individual subscribers. > I tried a similar example of recursive copy using File::Find, Copy. > I tried to copy all files with extension ".c" to a dire

Re: Recursive Copy

2006-08-16 Thread John W. Krahn
John W. Krahn wrote: > > UNTESTED: > > use File::Copy; > use File::Basename; > use File::Find; > > my $from_dir = 'A'; > my $to_dir = 'F'; > > my %count; > find sub { > my ( $name, undef, $ext ) = fileparse $_, qr/\..*/; > copy( $_, "$to_dir/$name" . ++$count{ $name } . $ext ) Perhap

Re: Recursive Copy

2006-08-16 Thread John W. Krahn
Steve Jardine wrote: > Hiya all, Hello, > Here's a sceneraio: > > > I have a directory tree: > > A- > |->B > |->C > -->D- >->E > > > In this directory tree I have possibly several same named files > in different directories. What I want to do is to recursively > copy all

RE: Recursive Copy

2006-08-16 Thread Timothy Johnson
Check out the File::Find. You can use it to recursively find and copy all of the files. If you want to manipulate the files based on pathname or filename, also check out File::Basename. Both should already be on your computer. -Original Message- From: Steve Jardine [mailto:[EMAIL PROTEC