Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2007
    Posts
    217
    Thanks
    25
    Thanked 1 Time in 1 Post

    rename: no such file or directory

    So why doesn't this rename work?

    PHP Code:
    rename('../mdwgold/scripts/origineel.jpg','../mdwpictures/gpfmottenPic102236.jpg'); 
    All I'm getting is an error saying: no such file or directory

    I've also tried the line without quotes like this:
    PHP Code:
    rename(../mdwgold/scripts/origineel.jpg,../mdwpictures/gpfmottenPic102236.jpg); 
    but it gives me the same error.

    The directories do exist and are chmodded to 777.
    So what's wrong with my code, or what's going on here?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    What you're doing looks correct (single or double quotes should be OK ... also try double quotes) ...

    rename("../mdwgold/scripts/origineel.jpg","../mdwpictures/gpfmottenPic102236.jpg");

    I'm guessing ../ is wrong.
    You're telling to go back one directory, is that correct?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •