Accenture interview question

Write a script to mimic "cp -r" (recursive copy)