title: Modify this script to upload all files from google forms response to one folder in google drive
body: <p>I found this script that will upload files from google forms response to a folder using the first response (name of applicant) to name the folder.</p>
  <pre><code>function onFormSubmit(e) {
    const folderId = &quot;###&quot;; // ID of the destination folder
    const form = FormApp.getActiveForm();
    const formResponses = form.getResponses();
    const itemResponses = formResponses[formResponses.length - 1].getItemResponses();
  
    // Prepare the folder.
    const destFolder = DriveApp.getFolderById(folderId);
    const folderName = itemResponses[0].getResponse();
  
    Logger.log(folderName)
  
    const subFolder = destFolder.getFoldersByName(folderName);
    const folder = subFolder.hasNext() ? subFolder.next() : destFolder.createFolder(folderName);
  
    // Move files to the folder.
    itemResponses[1].getResponse().forEach(id =&gt; DriveApp.getFileById(id).moveTo(folder));
  
    }
  </code></pre>
  <p>I tried using it but it will only upload one file - the one correspnding to the specific question number in the line <code>itemResponses[1].getResponse()</code></p>
  <p>How Do i modify this script so it will upload <strong>all</strong> of the files in the response regardless of their position without creating multiple folders?</p>
  <p>i.e. is it possible to set a range of questions that all the files will upload?</p>
  <p>Also, i want to modify the script so that name of the folder will also consist of the response sequence number as a prefix to the name of responder, how is that possible?</p>