Add file to Team Drive

164 views
Skip to first unread message

Bryan Guidroz

unread,
Jun 12, 2017, 12:08:23 PM6/12/17
to GAM for G Suite
I've created a Team Drive called SchoolAdmins with a subfolder called NightlySync
/SchoolAdmins/NightlySync

I want to use GAM to put a file in /SchoolAdmins/NightlySync.
I've tried:

gam user gamadmin add drivefile localfile /home/gamadmin/logs/StudentsToAdd.csv parentname NightlySync

The results displayed are:
Searching for files with query: "mimeType = "application/vnd.google-apps.folder" and "me" in owners and title = "NightlySync""...
 got 1 files...
Successfully uploaded gglStudentsToAdd.csv to Drive file ID 0B-oB2ZjMeRhXZDUzS0hBeEpRa1U

But, the folder is empty.

If I create a folder called NightlySync under My Drive (not Team Drives,) the file copies as expected into the folder.
Is there a trick to getting this to work with Team Drives?

Thanks

Jason Maners

unread,
Jun 12, 2017, 3:43:38 PM6/12/17
to GAM for G Suite
Have you tried getting the folder ID and using that instead of trying to search each time? That way you are pushing straight to a parentID?

Bryan Guidroz

unread,
Jun 12, 2017, 4:36:53 PM6/12/17
to GAM for G Suite
That did it.
Thanks!
Reply all
Reply to author
Forward
0 new messages