Syntactic Confectionery Delight | |
PerlMonks |
Re: How can I compare two directories and copy over files missing from one to another?by paulbort (Hermit) |
on Sep 17, 2004 at 21:31 UTC ( [id://391902]=note: print w/replies, xml ) | Need Help?? |
First, rsync already does this, so you might want to save yourself a whole bunch of time and just use it.
If you're using this as a learning experience, or you're stuck in an environment without rsync, there's one other thing to watch out for: What do you do when the source is a file and the target has a directory with the exact same name? Or if the source has a directory and the target has a file? The answers depend on what you really need the functionality for. -- Spring: Forces, Coiled Again!
In Section
Seekers of Perl Wisdom
|
|