//move the old file echo getcwd(); $path = 'c:\\xampp\\htdocs\\folderName\\'; $oldFile = '\\files\\'.$currFileName.".pdf"; $path1 = $oldFile; //echo $path1; $path2 = '\\files\\archives\\'.$newFileName; rename($path1, $path2);
NB i have changed the sitename above to simply 'folderName' for privacy reasons, but in the code the actual sitename is correct
So i have been working on this for a while and i keep getting hit with an error along the lines of:
Warning: rename(\files\1-M-Edwards.pdf,\archives\1-M-Edwards-17:18:48-18-07-13.pdf): The system cannot find the path specified. (code: 3) in C:\xampp\htdocs\folderName\general.php on line 406
Either this error or one saying that the directory label syntax is incorrect.
I have tried almost every possibility known to man including both forward and backslashes (working on windows), using the realpath() function, using the getcwd() function, many combinations of using either ./ or ../ or.\ ..\
nothing seems to work.
Anyone here able to see what i am doing wrong? I sure as hell can't
A very frustrated programmer