Mark -
I'm not sure what you mean by self-writing code.
The reason I want to use the copy function is this: I'm building a website that will auto create database driven websites for customers. The websites will be hosted as sub directories of my current hosting account. So as a customer clicks "order", I need to save the order data to the mysql db, create a sub directory for the name of the webpage, and copy the index.php file into that new directory. The customer's website domain name will be forwarded to this sub directory. The index.php is a generic file that sits in a build directory and each time a customer orders a website that index.php file needs to be copied to that newly created sub directory. The idea is to have this 100% automated.