google-drive-team-drive

Google Apps script move My drive Files to Team drive folder based on file name

孤街浪徒 提交于 2021-01-29 07:16:41
问题 I am new to Google Apps Script. I'm trying to get for our workplace a script to move files from a single folder on a Google My Drive, over to a Team Drive if part of the filename has a certain phrase. However the script is still moving any and all files from the My Drive source folder to the Team Drive target folder, even those that don't have the "required" phrase in the file name. Example file names used: ALT ADJ 01_03_2018 ALT CHG 01_03_2018 ALT CHG 01_04_2018 ALT PMT 01_03_2018 APX ADJ 01

Google Apps Script TeamDrive DriveApp.searchFolders and DriveApp.searchFiles does not return any results

瘦欲@ 提交于 2021-01-28 06:01:06
问题 I have some Google Apps script code that searchs for files and folders on TeamDrive. The issue I am having is that if a file or folder is created by my colleague, when I run my script it can't find the file. If I create a file, and my colleague runs the script, the script can't find the file even though we both have access to view, edit and can see the files and folders in Drive. If one of us edits the file made by the other person, then it becomes visible from the search. I ran into a

“Shared Drive” support in Google Apps Script

我怕爱的太早我们不能终老 提交于 2020-12-12 06:21:20
问题 I am writing a JavaScript tool in Google Apps Script to check some properties of documents, like "are all links valid", "are permissions set correctly", and so on. I am using the API documented in https://developers.google.com/apps-script/reference/drive/drive-app to look up files by ID, check their permissions, locate them in Google Drive etc., but I found that "Shared Drives" don't work very nicely with that API. For example, for the root folder of a Shared Drive, Folder.getName() only

Upload File to Google-drive Teamdrive folder with PyDrive

北城余情 提交于 2020-06-26 05:21:28
问题 I have been successfully uploading files to a google-drive-folder with PyDrive. But, when it comes to uploading files to a folder in a google-drive-teamdrive-folder which is shared with me, the following code is not working. from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive gauth = GoogleAuth() gauth.LocalWebserverAuth() drive = GoogleDrive(gauth) location_to_save = "D:\images" mImageLoc = location_to_save + "\\abcd.jpg" #[...Code to fetch and save the file as abcd.jpg

How to upload file to Group Drive (Shared Drive) with Google Drive API V3?

我与影子孤独终老i 提交于 2020-05-15 03:39:32
问题 I have a question how do I upload a file to Group Drive (Shared Drive) with Google Drive API? I have tried parent id for that folder (Group Drive) but that does not seem to work. public uploadFile(stream, totalSize, mime, fileName, parentId?, callback?) { //Init upload this.emit('progress', { type: 'file', name: fileName, uploaded: 0, size: totalSize }); debug('Uploading file %s with parentId: %s', fileName, parentId); //start upload var drive = google.drive({ version: 'v3', auth: this