title: PHP Rename suing variable, throwing error
body: <p>I'm trying to use a variable with the rename() function to rename a file at the end of a function. </p>
  
  <p>I'm creating the new file name like so;</p>
  
  <pre><code>$filenamegen = "XML_MERGE_" . date("d:h:i:s");
  </code></pre>
  
  <p>and then trying to use rename() like so;</p>
  
  <pre><code>rename ("F:\\a\\a\\a\\bb/tempname.xml", "F:\\a\\a\\a\\bb/" . $filenamegen . ".xml");
  </code></pre>
  
  <p>The above code is throwing the following error;</p>
  
  <pre><code>The filename, directory name, or volume label syntax is incorrect. (code: 123) 
  </code></pre>
  
  <p>If anyone has any ideas of how this could be fixed it would be much appriciated!</p>
  
  <p>Many thanks as always.</p>