title: Amazon S3 copy the directory to another directory
body: <p>How do i copy/duplicate a folder that contain sub-folders and files into another directory within the S3 bucket using PHP API?</p>
  
  <p><code>$s3-&gt;copy_object</code> only copies the folder, but not the files and sub-folders inside.</p>
  
  <p>Do i have to use <code>$s3-&gt;list_objects</code> to get all files and directory and run <code>$s3-&gt;copy_object</code> on every single file/directory?</p>