Copying and appending physical files

Another day, another challenge. I'm still working on our Office Connector integration and one of the features I want to present to my user community is the ability to use templates when creating new Document items. In order to do this a user can set the "from_template" property, after which I want to copy the physical file appended to that particular Document item and append it to the new Document item so the user won't have to do so manually. This saves our users a lot of work as new Document items often are created in bulk with the batchloader, literally by the hundreds. Instead of having to upload a file for each and every individual Document item this'll be all done programmatically so our engineers etc. can get straight to work on the various documents. Unfortunately however I can't seem to figure out how to copy the physical file on the server. Creating a File and relationship item is easy enough, but how do I copy the physical file the original File item points to?
Parents Reply Children
No Data