Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to How can I compare two directories and copy over files missing from one to another?

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!
  • Comment on Re: How can I compare two directories and copy over files missing from one to another?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://391902]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-24 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found