copy files from my drive to shared drive

802 views
Skip to first unread message

Victor Luis

unread,
Jun 7, 2022, 12:38:30 PM6/7/22
to GAM for Google Workspace
Hello everyone.

We have a case where a team here structured folders wrongly.

They organized everything in mydrive. Each one created a folder and also others created folders inside these folders, uploaded files inside. In short, there are different owners for each of the folders and files. Even third-party accounts that are not part of the panel have ownership of some folders and files within this folder structure.

This team intends to create copies of my drive to the shared drive to stop having these problems. Moving and copying via the drive interface is not an option, precisely because it is not possible to move files belonging to third parties there.

Through GAM Advanced I can create copies normally, even from external accounts that own some files. However, at the end, I found that there are discrepancies in the number of files and folders copied. Apparently, not everything was copied.

Can I make a filelist or some sort of listing of the files in this mydrive structure? The impasse I'm having is that I can only list the items that the user owns, if there is a folder inside that specific folder that belongs to another, it doesn't bring.

Is there any command that brings me the filelist of all folders and files even third-party files to a csv?

Best Regards

Kim Nilsson

unread,
Jun 8, 2022, 1:52:54 AM6/8/22
to GAM for Google Workspace
You can list all files that a user has access to (even all your users) relative to a start-folder when you print a filelist.
At least one of your users will have read access to the external files, else the external user wouldn't be able to put it inside an internal folder.

gam all users print filelist select PutFolderIDHere

Then you need to make sure that the one user you want to use for copying has read access to all those files.

This script has instructions on how to do your whole process.

Ullfig, Roberto Alfredo

unread,
Jun 16, 2022, 1:34:31 PM6/16/22
to GAM for Google Workspace
Hello, did you find the solution? Is the problem that only the owner of a file/folder can move it to a shared drive? If a folder contains files owned by different users then the folder cannot be moved at all?

---
Roberto Ullfig - rul...@uic.edu
Systems Administrator
Enterprise Applications & Services | Technology Solutions
University of Illinois - Chicago

From: google-ap...@googlegroups.com <google-ap...@googlegroups.com> on behalf of Victor Luis <vic...@santodigital.com.br>
Sent: Tuesday, June 7, 2022 11:38 AM
To: GAM for Google Workspace <google-ap...@googlegroups.com>
Subject: [GAM] copy files from my drive to shared drive
 
--
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/4808f4f2-fcd2-49eb-8ab7-85576bddf877n%40googlegroups.com.

VINI BETTEGA

unread,
Jun 23, 2022, 7:02:13 AM6/23/22
to GAM for Google Workspace
Hi all

I have exact same problem as Victor Luis.
Someone left the company and she had folders inside her MyDrive full of subfolders and multiple owners of different documents, so I can't simply take ownership of her drive and manually move the main folder to a shared drive.
Also to make things worst a lot of the documents inside these multiple folders are links in an external website and if I use a GAM command to force the move I believe it will brake all the links in the website.
Any help will be much appreciated.

Thanks in advance.

Kim Nilsson

unread,
Jun 23, 2022, 8:38:14 AM6/23/22
to Google Apps Manager
When moving, files should retain their file id, but not necessarily folders.

If you copy, everything will get new ids. 

Sergio Alvarez

unread,
Jun 23, 2022, 10:42:47 AM6/23/22
to GAM for Google Workspace

I have seen this problem a few times and the solution varies depending on the size of the folder you are dealing with, Easiest solution is dragging and dropping information over a shared folder. Doing this strips ownership of the file and set it as the shared folder but it is only something I would recommend with small folders. 

If you are dealing with a complex and large drive, you would need to take the following way:

1- Ran a GAM command to export the file list of each user 
2- compile the file list of all users 
3- Filter by location to get the single folder/drive that you want 
4- Change ownership to a single user 

Good luck !

VINI BETTEGA

unread,
Jun 24, 2022, 4:52:46 AM6/24/22
to GAM for Google Workspace
Hi Sergio

Thanks for your guidance but my doubt here would be, Is the folder ID and or files ID changing?
The company I'm working for didn't have an IT person until recently and they have 5y worth of work in "my Drives" which at some point we need to start to migrate to Shared Drives.

Kind Regards

Vini B

Sergio Alvarez

unread,
Jun 24, 2022, 11:49:07 AM6/24/22
to GAM for Google Workspace
Hi Vini, 

The Move command used by GAM will not create a different ID for documents but for folders, it will create a new folder and name it as on the other side. Drag and drop from the browser will not cause this, I would suggest for you to try it first to confirm and again do not try it with large number of files/folders 

Reply all
Reply to author
Forward
0 new messages