

At this time, if Utilities.sleep(3000) is not used, the file is moved before copying file is completed. When the file is uploaded and the file is copied, the installable form submit trigger is run.


So when the form was submitted, the script is run and the uploaded file is moved to the destination folder and the original file in the root folder is moved to the trash. This sample script is run by the installable form submit trigger. In this workaround, the original filename is retrieved from this filename, and move the file to the trash using the retrieved original filename. If (itemResponses.getItem().getTitle() = "PASSES"). The one which went to the "passes" folder and was then deleted from that folder. The name of this file is the same as the originally uploaded one. The original file is now showing up in Drive, not in a folder but there. The original file is deleted from the folder above. The original file being uploaded to a form. However, a copy of the original, unchanged file is going to Google Drive, the root folder. I have successfully renamed the submitted files, moved them to a new folder, and deleted them from the Google-generated folder. Google automatically makes a folder and sub-folders. I cannot figure out how to remove the copy that's just listed in "Drive", not in any folder. I've been able to move the renamed file to a new folder and delete the copy in the auto-generated submission folder. I'm having trouble sorting out why a google form is submitting files to both my drive (not in a folder) but also into an auto-generated submission folder. How do I remove a form-submitted file from Drive itself?
