Warning: rename(SpecialPictures/Advertisers/CampBC.png,SpecialPictures/Advertisers/OLDBusinessCards/CampBC.png) [<a href=‘function.rename’>function.rename</a>]: The system cannot find the path specified. (code: 3) in SACCC567\View.php on line 84
Like John said, there is a “]” at the end of the 2nd line, which is weird. I’m not sure PHP would even want to compile this but anyway, if it’s there in your script remove it
Then, “CampBC.png” is the actual picture that you want to move into “OLDBusinessCards”. Is it correct?
There’s a lot of Caps here and there, are you sure you got that right? (if you’re on Linux or a Mac. It should work on Windows)
The directory SpecialPictures should exists at the same place as the executed PHP file is (if I’m not mistaken), is it the case? Did you try to specify the entire path like “/var/www/…/SpecialPictures/etc…”?
If nothing works, copy the file “CampBC.png” into your Advertisers folder and the OLDBusinessCards folder manually. Then, try:
OK, I guess no one understands my dilemma or I just described it rather poorly - which is usually the case.
Here is what I am trying to do:
1 - the rename script is in a folder down from the root of my site. ie, root->folder1->folder2/myrename.php
2 - pictures/files to be renamed are in a different folder down from root. i3 root->pic1->pic2/picture.jpg
3 - running myrename.php has to go back up to the root then down the picture folder tree to find the picture and then rename it in a folder down 1 more level in the picture tree. ie, root->pic1->pic2->renamefolder/picture.jpg.
So, picture.jpg is the file I want to move using myrename.php script. However, if I have to traverse back up the folder tree to go to the picture.jpg down yet another folder tree, the error I have gets displayed and the file never gets moved.
Anyone understand and/or have some “fix” for this? Workaround? whatever?
I am trying this on my local development machine for now.
I tried your tip but still get the error “Warning: rename(C:\wamp\www\root\SpecialPictures\Advertisers\CampBC.png,C:\wamp\www\root\SpecialPictures\Advertisers\AdvertisersOLDBusinessCards\CampBC.png): The system cannot find the path specified. (code: 3) in C:\wamp\www\root\admin\ 3st\ViewerPDO3.php on line 100”
You should notice that the pictures file is a different branch off of the root than the php script. So, not sure why rename function will not find the path - it does exist.