If you need to create your own copy function, first open the original file for reading, then create (or a file with that name exists) for writing. Then you could simply read a byte in the original file, then write that byte to the new file. This is simple to program, however very inefficient in terms of time if it is being copied to the same disk. A better solution might be to create a buffer (just an array of bytes), fill the buffer then write the buffer. Hope this helps.