Jump to content

copy files from folder a to b


3dhomejoe

Recommended Posts

Well im guessing you could use something like this:

<?php$file = 'folder/a/example.txt';$newfile = 'folder/b/example.txt';if (!copy($file, $newfile)) {   echo "failed to copy $file...\n";}?>

That may work. But if it doesnt then you may have to give it a full path (ex. 'C:/WebServer/folder/a' etc).Have a rummage around in -> http://php.filearena.net/manual/en/function.copy.phpAnd also explore more of the Filesystem area of the functions for something better.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...