I need to overwrite an existing Google Sheets file with an attached Script
<p>I have a Google Sheets file with an attached Script. The script does a number of things, one is it makes a clone of it self using makeCopy. This portion works. Now I want to be able to keep the same cloned Google file name and same Google file ID and just update the content which includes a Spreadsheet and the associated Google script.</p>

<pre><code>if (!fileFound){
  var file = masterSSFile.makeCopy(reportFileName, RepFolder);
} else {
  oldFile.setContent(masterSSFile.getBlob());        
}
</code></pre>

<p>When I use makeCopy with the same file name it creates a second file with the same name but with a different file ID.
The else portion fails because .setContent argument seems to just accept text.  The result is the word "Blob" in the oldFile, everything else is gone.</p>

<p>I have other scripts that update the contents of a existing spreadsheet by overriding the contents of the various sheets, but I also want the associated script to also be included in the updated file keeping the same file ID.</p>