How to create a copy and move it to a specific folder

70 Views Asked by At

I need to come up with a script, so out of the menu I create a copy and put it in as specific folder. It was fine till DocsList was depreciated. Now I can't make it work.

1

There are 1 best solutions below

0
On

For actions related to files and folders now you can use DriveApp. This service contains almost the same methods that DocsList had so somethimes just by simply changing the name DocsList to DriveApp the code would work.

To copy a file DriveApp has the method copy(destination), where destination is the name of the folder you want to place the new copy of the file.

Here is the documentation about this method and the documentation about Driveapp service. Hope it helps.