Download a file by path
Downloads a file using its path (root or child folder). Supply DriveId and the path in the WITH clause.
SELECT * FROM download_file
WITH (
DriveId='me'
--OR-- Use Shared Drive Id or other User's Drive Id
--,DriveId='b!GtLN726LE0eXXXXXXXXXXXX'
,FileId='root:/dump.pdf:' --Path must end with colon
--OR-- File from some child folder
--,FileId='root:/myfolder/dump.pdf:'
--OR-- use File Id
--,FileId='01SUOJPKHXMPKD2UXXXXXXXXXXXXXXXXXX'
,TargetFilePath='C:\My files\Employees\List.xlsx'
)
--DriveId can be retrieved by selecting from 'list_drives' endpoint.
--FileId can be retrieved by selecting from 'list_files' endpoint.