title: php rename folders with files into
body: <p>I am trying to write a script in PHP to reset my ids in a database. But I must to rename the directories in my tables to which have same ids.</p>
  
  <p>So I try to use the rename function but I failed.</p>
  
  <p>I always have "No such file or directory". I try the absolute or relative path, to change chmod, to use a sleep before and yes my folders are existing.</p>
  
  <p>So I would know why this doesn't work :</p>
  
  <pre><code>rename('/uploads/photos/'.$old_id.'/', '/uploads/photos/'.$new_id.'/');
  </code></pre>
  
  <p>And my folders have some files into.</p>