title: Duplicated copy using file.makeCopy() function (Google Apps Script)
body: <p>I'm having a problem with a <code>file.makeCopy(name, destination)</code> function. I have a form and a spreadsheet template in a folder. I want to copy them to another directory. Here it is my code:</p>
  
  <pre><code>  // Create the destination folder
    var newFolder = parentFolder.createFolder(institute + " - a.s. " + schoolYear + " - " + school + " - Classe " + classroom + section);
  
    // Create a copy of the template form in the created folder and name it "questionario"
    var formFile = formTemplate.makeCopy('questionario', newFolder);
    var form = FormApp.openById(formFile.getId());
  
    // Create a spreadsheet for answers in the new folder and name it "risposte"
    var repliesFile = responseTemplate.makeCopy('risposte', newFolder);
    var replies = SpreadsheetApp.openById(repliesFile.getId());
  
    // Connect the form to the spreadsheet
    form.setDestination(FormApp.DestinationType.SPREADSHEET, replies.getId());
  </code></pre>
  
  <p>Both files, form and spresdsheet, are correctly copied to the new folder. The problem is another copy of the form is created in the source directory (template directory). That is not happening to the spreadsheet: the script create a copy in directory I want and no copies are created in the template folder. I can't figure it out, any idea? Some images are attached.</p>
  
  <p><strong>Template folder</strong>
  <a href="https://i.stack.imgur.com/6oTQe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6oTQe.png" alt="template folder"></a></p>
  
  <p><strong>Destination folder</strong>
  <a href="https://i.stack.imgur.com/j5cZj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j5cZj.png" alt="destination folder"></a></p>