in reply to Directory replication
If your on windows
system( 'xcopy /s /y /d /u srcdir destdir' ); [download]
You might not want the /u and you might want /e instead of /s. Help xcopy for more.