How to perform a full copy of a file including all comments in Google Drive using Apps Script? The file to be copied can be a document, presentation, spreadsheet.
A simple way to copy a file using Apps Script using the makeCopy()
function.
Here’s a sample function you can use:
function copyToFolder(){
var destinationFolderId = DriveApp.getFolderById("ID of destination folder")
var file = DriveApp.getFileById("ID of file to Copy")
file.makeCopy("New File Name" + file,destinationFolderId);
}