Moving Files In Google Drive Using Google Script : <p>I'm trying to create documents using information posted through Google forms, then once the document is created I would like to move the document into a shared folder for people to view.</p>

<p>At the moment I have the script taking all of the information from the Google Forms linked spreadsheet. </p>

<p>Using that information I'm using the following code to create the document:</p>

<pre><code>  var targetFolder = DriveApp.getFolderById(TARGET_FOLDER_ID);
  var newDoc = DocumentApp.create(requestID + " - " + requestSummary);
</code></pre>

<p>This is creating the document successfully in my Google Drive root folder, but I can't seem to move it where I want to move it to. </p>

<p>I've seen a lot of posts suggesting use stuff like targetFolder.addFile(newDoc) but that doesn't work, similarly I've seen examples like newDoc.addToFolder(targetFolder) but again this isn't working for me.</p>

<p>It seems that all the online questions people have already asked about this are using the previous API versions that are no longer applicable and these methods do not apply to the new DriveApp functionality. </p>

<p>What I would like, if possible, is to create the new document as above so that I can edit the contents using the script, then be able to move that file to a shared folder. (From what I understand there is no 'move' function at present, so making a copy and deleting the old one will suffice).</p>
