title: App Script for Copying Files and then Sharing those files to specific email addresses
body: <p>I've written this so far, which successfully copies the files into their destination:</p>
  <pre><code>      function createCopy()
  {
    let file = DriveApp.getFileById(&quot;ID of copied file&quot;); // ID of file you are copying
    let sheet = SpreadsheetApp.openByUrl(&quot;Sheet with names and Emails&quot;).getSheetByName(&quot;Sheet&quot;); //Full url of the file and then the name of the sheet you are copying
    let range = sheet.getRange(&quot;Range of filenames&quot;); // Range where the file names are
    let values = range.getValues();
    let folder = DriveApp.getFolderById(&quot;Destination Folder&quot;); // ID of hte folder where you want the copies to be made.
    for(let i=0; i&lt;values.length; i++)
    {
      file.makeCopy(values[i].toString(), folder);
    }
  }
  </code></pre>
  <p>I'm now trying to share those files with individual emails, this is what I have tried so far</p>
  <pre><code>  function createCopy()
  {
    let file = DriveApp.getFileById(&quot;ID of file to copy&quot;); 
    let sheet = SpreadsheetApp.openByUrl('Sheet with names and emails').getSheetByName(&quot;Sheet1&quot;);
    let range = sheet.getRange('D2:D5'); 
    let email = sheet.getRange('C2:C5')
    let values = range.getValues();
    let folder = DriveApp.getFolderById(&quot;Destination Folder&quot;);
  
    for(let i=0; i&lt;values.length; i++)
    {
      file.makeCopy(values[i].toString(), folder).addEditor(email);
      
    }
  }
  </code></pre>
  <p>But I get this error:</p>
  <blockquote>
  <p>Exception: The parameters (SpreadsheetApp.Range) don't match the method signature for DriveApp.File.addEditor.</p>
  </blockquote>