title: PHP - Copy ONLY if the file does not exist
body: <p>I have read dozens of similar questions but none of the answers were what I needed. Please point me to it if it exists.</p>
  
  <p>I have a folder named "txts" and another folder named "content" like this: </p>
  
  <pre><code>files/texts    files/content
  </code></pre>
  
  <p>I want to copy a file from "txts" to "contents" but only if that file does not already exist in the "content" folder.</p>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>&lt;?php 
   copy('files/txts/file1.txt', 'files/content/file1.txt');
  ?&gt;
  </code></pre>
  
  <p>The problem is that it gets overwritten if it is already there. I need to copy the file (without deleting the original) and add it to the destination folder if it doesn't already exist.</p>