Is it possible to explicitly move a file through python's googleapiclient module? I want to create the following function, given a file, original path and destination path:
def move_file(service, filename, init_drive_path, drive_path, copy=False):
"""Moves a file in Google Drive from one location to another.
service: Drive API service instance.
filename (string): full name of file on drive
init_drive_path (string): initial file location on Drive
drive_path (string): the file path to move the file in on Drive
copy (boolean): file should be saved in both locations
Returns nothing.
"""
Currently I have been executing this through manually downloading the file and then re-uploading it to the desired location, however this is not practical for big files and seems like a work-around method anyway.
Here's the documentation for the methods available on the google-drive-api.
EDIT See solution below: