Can't move a folder. Parent to an unshared file?

152 views
Skip to first unread message

Martin Främke

unread,
Sep 27, 2024, 4:20:28 AM9/27/24
to GAM for Google Workspace
Hi there,

I am owner of a folder with a single file in it. I'm trying to move that folder to a Shared Drive via the UI by drag & drop. I get the error that it can't be moved because two items inside can't be moved. However, I do own the folder and the file that I can see.

My guess is that files owned by somebody else but no longer shared with me have my folder as a parent.

How do I find these files? Is there a command that lets me see all files that have "Folder X" as a parent, regardless of who owns the file?

I assume I can move the folder with GAM, but that would create an orphan, no?

Thank you for any ideas.
Cheers,
Ma♪ti♫

Ross Scroggs

unread,
Sep 27, 2024, 10:21:38 AM9/27/24
to google-ap...@googlegroups.com
gam user martin print filelist select <FolderID> fields id,name,mimetype,owners.emailaddress showownedby any

Ross
----
Ross Scroggs



ISH Logo
International School of Hamburg
Hemmingstedter Weg 130
22609 Hamburg, Germany
+49 (0)40 8000 50 0
www.ishamburg.org
Thank you for not printing this!
This message and any attachments are to be read only by intended recipients. If you are not the intended recipient, please inform the sender and delete this message and its contents from your system. Information in this message may be confidential, privileged, or copyrighted. Unauthorized copying, disclosure, or distribution of any of the contents of this message is prohibited and may be unlawful. Thank you for your understanding. Deutsche Übersetzung

Legal Identity: Internationale Schule Hamburg e.V., info@ishamburg.org, VR 5935, Amtsgerichts Hamburg, USt.-IdNr.DE118716561. Dr. Alan Knobloch, Head of School. Monica Birkel, Board Chair. Michal Brylinski, Vice Chair.
Privacy Policy

--
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/e30ad3be-2831-4ac4-b17d-961baed12912n%40googlegroups.com.

Martin Främke

unread,
Sep 30, 2024, 4:58:55 AM9/30/24
to GAM for Google Workspace
Thanks very much, Ross!
I wasn't aware of "showownedby", that is really helpful, and I've used it a few times for other things already.
However, the command didn't reveal any hidden files that live in my folder. The error I see when trying to drag & drop the relevant folder to a shared drive tells me "This move contains unmovable items. You don't have permission to view them."
So I figured: the command with "showownedby" doesn't do the trick because I don't have access to the file. It just lives in my folder (what a weird system that that is even possible).
Then I ran "gam ou_and_children "/Staff" print filelist select <folderID> fullpath fields id,name,mimetype,owners.emailaddress showownedby any" 
I guess in that command "showownedby any" wasn't necessary. But it did reveal the file I was looking for!
Thank you for your help.

Cheers,
Ma♪ti♫
On Friday 27 September 2024 at 16:21:38 UTC+2 Ross Scroggs wrote:
gam user martin print filelist select <FolderID> fields id,name,mimetype,owners.emailaddress showownedby any

Ross
----
Ross Scroggs



On Sep 27, 2024, at 1:20 AM, 'Martin Främke' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Hi there,

I am owner of a folder with a single file in it. I'm trying to move that folder to a Shared Drive via the UI by drag & drop. I get the error that it can't be moved because two items inside can't be moved. However, I do own the folder and the file that I can see.

My guess is that files owned by somebody else but no longer shared with me have my folder as a parent.

How do I find these files? Is there a command that lets me see all files that have "Folder X" as a parent, regardless of who owns the file?

I assume I can move the folder with GAM, but that would create an orphan, no?

Thank you for any ideas.
Cheers,
Ma♪ti♫

ISH Logo
International School of Hamburg
Hemmingstedter Weg 130
22609 Hamburg, Germany
+49 (0)40 8000 50 0
www.ishamburg.org
Thank you for not printing this!
This message and any attachments are to be read only by intended recipients. If you are not the intended recipient, please inform the sender and delete this message and its contents from your system. Information in this message may be confidential, privileged, or copyrighted. Unauthorized copying, disclosure, or distribution of any of the contents of this message is prohibited and may be unlawful. Thank you for your understanding. Deutsche Übersetzung

Legal Identity: Internationale Schule Hamburg e.V., in...@ishamburg.org, VR 5935, Amtsgerichts Hamburg, USt.-IdNr.DE118716561. Dr. Alan Knobloch, Head of School. Monica Birkel, Board Chair. Michal Brylinski, Vice Chair.
Privacy Policy

Martin Främke

unread,
May 23, 2025, 9:25:06 AMMay 23
to GAM for Google Workspace
Hi,

I'm stuck on this again.
I'm trying to move a folder structure to a shared drive, but I get "13 files cannot be moved". Some of these must be folders, because the documented limit to reject a move is 25 files. Anyway, I've done this:
  1. In the Drive GUI I filtered in the folder showing "not owned by me". Result = 0. 
  2. I ran 
    gam redirect csv ./filelist.csv all users_ns_susp print filelist select <folderID> fullpath fields id,name,mimetype,owners.emailaddress
    This took a while, and the result has only files owned by me. Nothing owned by anybody else. I thought this would reveal really all files in a folder structure. But my suspected orphans weren't in the mix.
The command to collect orphans wouldn't work here, because I don't know who the owner is, right?
I have a Trust Rule that suspends sharing for a number of users. I did deactivate that before I ran the command.
The Drive service is also on for these users, even the suspended ones. I suspect the orphans belong to one of the suspended users, but no results. Though GAM shows "Print Failed: Not Found" for my OU of suspended users, I wonder if that is relevant.

Any idea how I can identify these ghost files? What if the ghost files are actually shortcuts? Would it make a difference, or are shortcut treated like files?
Thank you!

Cheers,
Ma♪ti♫

Ross Scroggs

unread,
May 23, 2025, 10:28:44 AMMay 23
to google-ap...@googlegroups.com
Run this command for the owner of <folderId>

gam redirect csv ./filelist.csv user folde...@domain.com  print filelist select <folderID> fullpath fields id,name,mimetype,owners.emailaddress showownedby others showparent

Ross
----
Ross Scroggs



Legal Identity: Internationale Schule Hamburg e.V., info@ishamburg.org, VR 5935, Amtsgerichts Hamburg, USt.-IdNr.DE118716561. Dr. Alan Knobloch, Head of School. Monica Birkel, Board Chair. Michal Brylinski, Vice Chair.
Privacy Policy

--
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.

Martin Främke

unread,
May 23, 2025, 10:40:31 AMMay 23
to GAM for Google Workspace
Great! That revealed 43 files for which I should now be able to add ACLs to be able to handle them.
What was the crucial difference between our commands? I think I did try "showownedby others", specifically for the suspended users (one of whom owns the ghost files, as I've now learned), but that didn't reveal them. I just re-ran my command with "showownedby others" and it also revealed them. I must have lost track of what I tried. Sorry.
Thank you so much for your help!

Cheers,
Ma♪ti♫

Martin Främke

unread,
Sep 3, 2025, 11:08:17 AM (2 days ago) Sep 3
to GAM for Google Workspace
Hi again,

I'm stuck on this once more.
Trying to move <folderID> from User1's My Drive to a Shared Drive using the GUI, which tells me there are four unmovable items (must be at least one folder with more stuff in it). Using "-owner:me" in the GUI's search reveals nothing, though. 
I suspect there are files in the structure of <folderID> that User1 no longer has access to (but User1 owns the parent of the files).
The command 
gam all users_ns_susp  print filelist todrive select <folderID> fullpath fields id,name,mimetype,owners.emailaddress showownedby any showparent
reveals only files owned by User1.
I figured I need to run this for all users, to get a look at the files from the owner's side, and not from User1's side, who might not have access to the files anymore.
I've tested this with test files, and the concept seems to work. Still, no results for all users_ns_susp that are not already owned by User1.

I've also taken into account users that might sit in OUs that have the Drive service disabled and temporarily moved them somewhere else. But nothing.
Any ideas what I'm overlooking?
Thank you.

Cheers,
Ma♪ti♫

Ross Scroggs

unread,
Sep 3, 2025, 11:22:47 AM (2 days ago) Sep 3
to google-ap...@googlegroups.com
You need the user1 My Drive folder info.
gam redirect csv ./User1Files.csv user user1 print filelist select <FolderID> fields id,name,mimetype,owners.emailaddress showownedby any showparent

Are there outside domain owned files?

Ross
----
Ross Scroggs


Legal Identity: Internationale Schule Hamburg e.V., info@ishamburg.org, VR 5935, Amtsgerichts Hamburg, USt.-IdNr.DE118716561. Dr. Alan Knobloch, Head of School. Monica Birkel, Board Chair. Michal Brylinski, Vice Chair.
Privacy Policy

--
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.

Martin Främke

unread,
Sep 3, 2025, 11:28:29 AM (2 days ago) Sep 3
to GAM for Google Workspace
Hi Ross,

>  You need the user1 My Drive folder info.
Yes, I have replaced <folderID> with the ID that User1 owns. Or do you mean the ID of User1's My Drive root? 

> Are there outside domain owned files?
No, I don't think so. I ran a search to list all outside-domain owned files for the entire domain the other day, and then looked for the to-be-moved-folder in the results.

Cheers,
Ma♪ti♫

Ross Scroggs

unread,
Sep 3, 2025, 11:35:26 AM (2 days ago) Sep 3
to google-ap...@googlegroups.com
Yes, I have replaced <folderID> with the ID that User1 owns.

Correct, what do you see in User1Files.csv?

Send me a private Meet/Zoom invitation to discuss.

Ross
----
Ross Scroggs


Legal Identity: Internationale Schule Hamburg e.V., info@ishamburg.org, VR 5935, Amtsgerichts Hamburg, USt.-IdNr.DE118716561. Dr. Alan Knobloch, Head of School. Monica Birkel, Board Chair. Michal Brylinski, Vice Chair.
Privacy Policy

--
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.
Reply all
Reply to author
Forward
0 new messages