Problem moving files--PLEASE HELP!
Posted: Sat Mar 20, 2004 9:52 am
Can anyone tell me why this doesn't work, it is meant to move a file from one folder to another; in this case it moves a file (listed on a directory) from a "form_data" folder to a "moderated" folder. I have created both folders and have inserted some test txt files, but it keeps saying the file or directory don't exist.
Code: Select all
if($Rename){
for($n = 0;$n < count($Rename); $n++){
$OldFilename = $Renameї$n];
$Old = "form_data/$OldFilename";
$New = "moderated/$OldFilename";
if(rename("$Old", "$New")){
print("<TR><TD colspan=4><CENTER>Your file $Renameї$n], was successfully moved!</TD></TR>");
}else{
print("<TR><TD colspan=4><CENTER>Your file, $Renameї$n], could not be moved.</TD></TR>");
}
}
print("<TR><TD colspan=4><center> </TD></TR>");
}