Beginning Sept. 30, 2020, you will no longer be able to place a file in multiple parent folders; every file must have exactly one parent folder location. Instead, you can use a combination of status checks and a new shortcut implementation to accomplish file-related operations.
Add a parent folder to a file
To add a parent folder to a file:
files.update(), with the
addParentsfield set to the new parent folder's ID and the
true, to add a parent folder for the file.
false, all current parent folders are removed and a new parent folder is added.
Create a file in multiple parent folders
With the new model, you cannot create a file in multiple parent folders. Instead, you can create the file in one parent folder and use shortcuts in the other parent folders:
Create a shortcut in each additional parent. For information about creating shortcuts, refer to Create a shortcut to a Drive file.
Move a file to another parent folder
Under the new model, the current user must have share access to a file to move it. To move a file to from one location to another:
removeParentsfield set to the current parent folder's ID.
addParentsfield set to the new parent folder's ID
enforceSingleParentfield set to
false, you can create a shortcut in the new location. For information about creating shortcuts, refer to Create a shortcut to a Drive file.
For more information on moving files, refer to Move files between folders.