Re: [GAM] Copy Folders from Shared Drive to users My Drive

1,037 views
Skip to first unread message

Ross Scroggs

unread,
Jul 20, 2022, 9:16:22 AM7/20/22
to google-ap...@googlegroups.com
Fraser,


Scrool down to: Specify the target(parent) folder

Ross


On Jul 20, 2022, at 5:46 AM, 'Fraser Leafe' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Hello! 

I'm currently running a script to copy files from a shared drive to a users 'My Drive' - I have used the below command to achieve this: 

gam user <exa...@emaildomain.org> copy drivefile <specificfolderID> recursive copytopfolderpermissions false copyfilepermissions false copysubfolderpermissions false newfilename <"Name of new folder">

However, the folder doesn't appear in the end users 'My Drive' - is there something I need to amend for this to work?

The information in this e-mail, together with any attachments, is confidential.  If you have received this message in error you must not print off, copy, use or disclose the contents.  The information may be covered by legal and/or professional privilege.  Please delete from your system and inform the sender of the error.  E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.  The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.  If verification is required, please request a hard-copy version.  

Cherwell School is a part the River Learning Trust which is an exempt charitable company limited by guarantee registered in England and Wales with registered company number 7966500 and its registered office is C/O Gosford Hill School, Oxford Road, Kidlington, Oxfordshire, United Kingdom, OX5 2NT.


--
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/2a9d602b-c35a-4579-80ad-5483a8b37701n%40googlegroups.com.

Fraser Leafe

unread,
Jul 21, 2022, 6:23:02 AM7/21/22
to GAM for Google Workspace
Hi Ross, 

Thanks very much :-) 
I've tried this but I'm getting Syntax errors, which is certainly a case of me missing something. See below; 

C:\windows\system32>gam user fle...@cherwellschool.org copy drivefile teamdriveparentid   1ibSejAncCm3123456ltBCI0  recursive copytopfolderpermissions false copyfilepermissions false copysubfolderpermissions false
Command: gam user fle...@cherwellschool.org copy drivefile >>>teamdriveparentid<<<  1ibSejAncCm3123456ltBCI0 recursive copytopfolderpermissions false copyfilepermissions false copysubfolderpermissions false

ERROR: Invalid argument
Help: Syntax in file C:\GAMADV-XTD3\GamCommands.txt
Help: Documentation is at https://github.com/taers232c/GAMADV-XTD3/wiki

I've scrambled the ID a bit for obvious reasons

Ross Scroggs

unread,
Jul 21, 2022, 9:15:22 AM7/21/22
to google-ap...@googlegroups.com
Fraser,

This "teamdriveparentid   1ibSejAncCm3123456ltBCI0" is where to put the folder. 

gam user fle...@cherwellschool.org copy drivefile <PutFolderToCopyIDHere> teamdriveparentid   1ibSejAncCm3123456ltBCI0  recursive copytopfolderpermissions false copyfilepermissions false copysubfolderpermissions false

Ross

Fraser Leafe

unread,
Jul 27, 2022, 4:28:13 AM7/27/22
to GAM for Google Workspace
Hi Ross, 

Thanks so much! Really appreciate the help. 
Reply all
Reply to author
Forward
0 new messages