Create, update, delete, and query the files and folders contained in a user's Google Drive.
The Files table supports only a subset of columns for filtering. Below is a table containing those columns with their supported operations. All filters can be connected with 'OR' or 'AND' operators.
|Name||contains, =, !=|
|MIMEType||contains, =, !=|
|ModifiedTime||<=, <, =, !=, >, >=|
The contains operator only performs prefix matching for a name.
For example, the name "HelloWorld" would match for name contains 'Hello' but not
name contains 'World'.
SELECT * FROM [Files] WHERE ModifiedTime>'2017-01-01' OR Contains(Name,'CData')
SELECT * FROM [Files] WHERE OwnerEmail in ('firstname.lastname@example.org') AND Starred = true
SELECT * FROM [Files] WHERE Starred = true
SELECT * FROM [Files] WHERE TeamDriveId='0ACkq0ZiV0yJCUk9PVA'Note: You must set the connection property TeamDriveSupport to 'true', in order to query from a specific Team Drive.
You must specify values at least for Name and one of LocalFile or FileData.
Insert into Files (Name,LocalFile) VALUES('MyFile','C:\\\\file.txt')
Id is required for updating a File.
Update Files SET Name='UpdatedName' WHERE Id = '19YFv8wmvKixCYaJJAeE8jN3ROt7x1ZicvXwflswVOrw'
Also the content of the file can be updated. Note that this will replace the actual content.
Update Files SET LocalFile='C:\\\\file.txt' WHERE Id = '19YFv8wmvKixCYaJJAeE8jN3ROt7x1ZicvXwflswVOrw'
To delete a File, the Id is required.
DELETE FROM [Files] WHERE Id = '1Dx6GTyhgTmTjtoy8GuG0n0qaOsKyhwrOG6MG8A2QQYA'
The ID of the file.
The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of Team Drives, My Drive root folder, and Application Data folder the name is constant.
The Id of the teamDrive.
A short description of the file or folder.
The extension of the file.
The MIME type of the file.
The creation date of the file or folder.
The last modified date of the file or folder.
The size of the file in bytes.
The name of the resource's owner.
The email of the resource's owner.
This field shows whether or not the resource is a folder.
This field sets whether or not the resource is starred.
This field sets whether or not the resource has been moved to the trash.
This field sets whether or not the resource has been viewed by the current user.
A comma-separated list of parent folder Ids.
A semicolon-separated list of child resource Ids.
A semicolon-separated list of child resource links.
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
This field accepts a valid Google Drive SDK query, which overrides conditionals in the WHERE clause.
The local file path, including file name, of the file to be uploaded. Required when FileData is not specified. Used only for inserting and updating a file.
If the LocalFile input is empty, file data will be output in the format specified by the Encoding input. Used only for inserting and updating a file.
The FileData input encoding type. Used only for inserting and updating a file.
The allowed values are NONE, BASE64.
The default value is BASE64.