Page 1 of 1

moving a file

Posted: Fri Sep 12, 2003 2:21 am
by toms100
i cant quite get this one to work, but heres what i want to do:
i have a folder, "incoming"
i have a folder "stored"
there are files in the incoming folder that need to be moved to the stored folder using a script (for my download script).
can someone help me out?
i aint done much with files before :)

cheers

tom

Posted: Fri Sep 12, 2003 3:28 am
by Nay
The function copy() might do. I think you can guess what it does. Do some research at http://www.php.net

-Nay

Posted: Fri Sep 12, 2003 3:30 am
by JayBird
basically, you are going to have to copy the file from the old dir to the new one - read this http://se.php.net/manual/en/function.copy.php

then delete the original file - read this http://se.php.net/manual/en/function.unlink.php

Mark

Posted: Fri Sep 12, 2003 7:43 am
by toms100
cheers for the help guys!