I'd solve this with rsync. I think its defaults even mirror the logic you requested. I use this on my Windows XP laptop to mirror my data up to my network share. I have to add options to get it to delete stuff on the target side - the default is to ignore target-side stuff that doesn't already exist on the source.
$ rsync source_dir target_dirAdded, minutes later.
Alternatively, you can use an iterator form of File::Find at Re: Re: (Perl6) Groking Continuations (iterators) and then just walk each directory tree in sequence. This will allow you to write this in perl with no serious problems. Its still easier to just have rsync handle it.
In reply to Re: searching and modifying two directory trees
by diotalevi
in thread searching and modifying two directory trees
by argv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |