Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdiasriver/0ec5a5b74209a373257b3563b74d3955 to your computer and use it in GitHub Desktop.
Save abdiasriver/0ec5a5b74209a373257b3563b74d3955 to your computer and use it in GitHub Desktop.
function copyDocs() {
for(i=0; i<1; i++){ //Cambia el 1 por las copias que quieras en la carpeta.
//Abre lo que quieras copiar en el navegador
//Checa en url unas letras que definen el ID del documento o archivo
//Copia el ID del archivo y pegalo en IDARCHIVOORIGEN
//Notice there are single quotations around the document ID, that is important!
source_file = DriveApp.getFileById('IDARCHIVOORIGEN');
dest_folder = DriveApp.getFolderById("IDCARPETADESTINO");
// drive.makeCopy();
new_file = source_file.makeCopy(source_file.getName() , dest_folder);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment