title: Copy and rename PHP script
body: <p>i'm making a script that copies a file to another direction and renames it in there with a date stamp. This is what I got so far:</p>
  
  <pre><code>&lt;?php
  
  copy('test.xlsx', 'date/test.xlsx');
  
  
  $filename = 'date/test.xlsx';
  
  if (file_exists($filename)) {
      $date = new DateTime();
      rename("date/test.xlsx", "date/test " . $date-&gt;format('Y-m-d') . ".xlsx");
      echo "Rename done";
  } else {
      echo "File not found";
  }
  ?&gt;
  </code></pre>
  
  <p>It gives me a error cant find script.php (line 15)
  Line 15: <code>rename("date/test.xlsx", "test " . $date-&gt;format('Y-m-d') . ".xlsx");</code>
  I don't know whats wrong because its the first time in PHP for me i looked on the internet for it but cant find it so i hope you guys can help me out.
  Thanks.</p>