drive.Files
Last updated
Last updated
Create a file or folder.
name: File | folder name.
mime_type: Use MimeTypes
or visit .
dest_folder_id: Destination folder (optional). None
to create a file in Root.
File or folder info.
Create a shortcut.
file_id: Target file ID.
shortcut_name: Shortcut name (optional).
dest_folder_id: Destination folder (optional). None
to create a shortcut file in the same place with the target file.
Shortcut info.
Upload a file.
file: Local file.
dest_folder_id: Destination folder (optional).
rename: Rename file before uploading (optional).
File info.
Get a file or folder info.
file_id: File | folder ID.
fields: * is all fields.
File | folder info.
Move a file or folder.
file_id: File | folder ID.
dest_folder_id: Destination folder.
File | folder info.
Copy a file. Not support folder yet.
file_id: File ID.
name_prefix: Default to 'Copy of '
.
name_suffix: Default to None
.
dest_folder_id: Destination folder (optional). None
to make a copy in the same place with the original file.
File info.
Rename a file or folder.
file_id: File | folder ID.
name: Renamed name.
File | folder info.
Restrict the content of a file.
file_id: File ID.
read_only: True
or False
.
owner_restricted: Only the owner of the file can change the restriction status.
reason: Optional.
File info.
List files related to this account.
operator: and
, or
.
List of files.
Download a file from the Drive.
file_id: File ID.
dest_directory: Destination directory (optional). None
to save the file to current directory.
get_value: False
to save the file, True
to get the file value only.
File value when get_value is True
.
Export the Google Workspace documents.
file_id: File ID.
dest_directory: Destination directory (optional). None
to save the file to current directory.
get_value: False
to save the file, True
to get the file value only.
File value when get_value is True
.
Empty the trash.
Trash a file or restore a file from trash.
file_id: File | Folder ID.
restore: True
to restore, False
to move to trash.
File info.
Delete a file or folder.
file_id: File | folder ID.
args: Use SearchTerms
or visit
format: xlsx, docx, pdf, pptx, json, csv, etc. Defaults to 'default'
(Sheets:xlsx, Docs:docx, Slides:pptx, Drawings:pdf, AppScript:json). Read more: .