moving a file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
toms100
Forum Contributor
Posts: 119
Joined: Wed Feb 26, 2003 10:29 am
Location: Bristol,UK

moving a file

Post 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
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

The function copy() might do. I think you can guess what it does. Do some research at http://www.php.net

-Nay
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post 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
toms100
Forum Contributor
Posts: 119
Joined: Wed Feb 26, 2003 10:29 am
Location: Bristol,UK

Post by toms100 »

cheers for the help guys!
Post Reply