> Which built-in PHP functions would I use to move a file from one directory > into another? I'm thinking that this requires more than one function to > achieve what I want. > > What approaches should I take? Do I need to copy the file into a temporary > directory first and then move it to the destination directory? Or Is it > possible for me to move the file directly from one directory into another? > > The functions I read about so far are copy() and move_uploaded_file(), but > the move_uploaded_file() function seems to work only when the file is > uploaded from an HTML form, or am I wrong? > > Just looking for some direction.
Use copy() to copy the file and then unlink() to delete the old one if the copy is successful. Or you can use exec() to make a system call to do it. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php