Re: Sharing Files using GAM

310 views
Skip to first unread message
Message has been deleted
Message has been deleted

Brian Kim

unread,
Mar 9, 2021, 8:40:20 AM3/9/21
to GAM for Google Workspace
Yes it's possible.
On Tuesday, March 9, 2021 at 7:45:16 a.m. UTC-5 jma...@gulbrandsen.com wrote:
OR is it possible to upload locally present CSV to upload to User's Gdrive 

On Tuesday, March 9, 2021 at 6:11:16 PM UTC+5:30 Jyoti Madur wrote:
Hello,

I want to know whether we share a CSV file in the Google Drive to another user in the same domain.

Thank you.

Regards,
JM

Message has been deleted

Ross Scroggs

unread,
Mar 10, 2021, 10:53:41 AM3/10/21
to google-ap...@googlegroups.com
Jyoti,

A) I am not sure about the command mentioned below but I want to upload a local file to a SharedDrive -> SharedDriveFolder -> SharedDriveSubfolder
The command Brian mentioned is the command you use to upload files.
 

==> gam user EMAILID add drivefile localfile <LocalFilePath> teamdriveparentid <SharedDriveSubfolderID> copyrequireswriterpermission true writerscanshare true


B) Then after I want to find the uploaded file's FileID so that I can share it with another user

The previous command will return the ID of the uploaded file


==> gam user EMAILID add drivefileacl <FileIDfromPreviousCommand> user us...@domain.com role editor


Ross


On Wed, Mar 10, 2021 at 1:51 AM 'Jyoti Madur' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:
Hi Brian,

A) I am not sure about the command mentioned below but I want to upload a local file to a SharedDrive -> SharedDriveFolder -> SharedDriveSubfolder
 

==> gam user EMAILID add drivefileacl <LocalFilePath> teamdriveparent <SharedDriveName> teamdriveparentname <DriveFolderName> copyrequireswriterpermission true writerscanshare true user role editor 


B) Then after I want to find the uploaded file's FileID so that I can share it with another user


Can you please help me with this?



--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/088b370f-2a73-42f8-a6fb-289cc697e3f7n%40googlegroups.com.


--
Regards,
Jyoti Madur

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAMUDA4_qdzphgir930KRDYk6sM6UO41HRJHDaM3xeQDHVaW_qA%40mail.gmail.com.


--

Jyoti Madur

unread,
Mar 11, 2021, 8:53:33 AM3/11/21
to google-ap...@googlegroups.com
Ross,

Thank you for the reply.

Going further I wanted to find a Shared Drive ID. I have used below mentioned commands with no luck:

gam info teamdrive "SharedDriveNAme"
gam show teamdriveinfo "SharedDriveNAme"
gam print teamdrives
gam user x...@domain.com print teamdrives
gam user x...@domain.com print filelist select teamdrive "SharedDriveNAme" fields id,name

Am I looking at wrong syntax?


Brian Kim

unread,
Mar 11, 2021, 9:02:06 AM3/11/21
to GAM for Google Workspace
What version of GAM are you using? TD in GAMADV-XTD3 stands for TeamDrive.

If using GAMADV-XTD3, gam print teamdrives fields id  should show the IDs.

Jyoti Madur

unread,
Mar 11, 2021, 9:08:48 AM3/11/21
to google-ap...@googlegroups.com
I am using GAMADV-XTD3 and the provided command worked.

Thank you.

Ross Scroggs

unread,
Mar 11, 2021, 9:45:41 AM3/11/21
to google-ap...@googlegroups.com
Jyoti,


For an individual Shared Drive where you have the name:
gam info teamdrive teamdrive "SharedDriveNAme"
The second teamdrive indicates that what follows in a name.
If you already have an ID and want additional info you'd say:
gam info teamdrive "SharedDriveID"
gam info teamdrive teamdriveid "SharedDriveID"

Reply all
Reply to author
Forward
0 new messages