title: How to rename a directory in PHP to a Unique ID?
body: <p>I am a bit familiar with PHP, although I am trying to work with a PHP script that I haven't really done before:</p>
  
  <pre><code>$src = "/home/user/public_html/test1";
  $dest = "/home/user/public_html/test2";
  shell_exec("cp -r $src $dest");
  echo "Directory successfully created."; //output when done
  rename("$dest","uniqid();");
  </code></pre>
  
  <p>This script is supposed to copy the files of a directory so that the newly created directory will be /home/user/public_html/test2/test1.</p>
  
  <p>However, because this script is supposed to be used dynamically, I would like the rename function to rename the $dest to a uniqid(); function.</p>
  
  <p>Can anyone compile a script for me that can do this or provide instructions on how to??</p>
  
  <p>Thanks.</p>