On Wed, 6 Apr 2005, Debbie Cooper wrote:

> So the sub directories in DirA will be combined with like-named sub 
> directories in DirB and they will move up a level in the hierarchy.

Why aren't you using rsync for this? 

You can write it by hand in Perl, but rsync is the Swiss Army knife of 
file copy tools; a problem like this would be no trouble at all with it.

    $ rsync dir1 dir2 targetdir

There are dozens of command line flags that can fine-tune this, but even 
this simple version should get you close to what you need.

Rsync examples: http://samba.anu.edu.au/rsync/examples.html

It looks like you may be a Windows user. If you have Cygwin, rsync is 
available there, or you can follow instructions similar to these: 
http://optics.ph.unimelb.edu.au/help/rsync/rsync_pc1.html

Perl's a great tool, but sometimes, other things are *much* easier.



-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to