Blank CSV When Piping Print Users Into Orphaned File Move

38 views
Skip to first unread message

Dane Connor

unread,
Oct 2, 2025, 1:07:21 AM (4 days ago) Oct 2
to GAM for Google Workspace
Hi All,

I am trying to speed up an Orphaned File move by piping in a "gam print users issuspended false" so it can run with multiprocessing.

Command used:
gam print users issuspended false fields primaryEmail | gam redirect csv "C:\temp\orphanfiles1.csv" multiprocess csv - gam user ~primaryEmail collect orphans targetuserfoldername "OrphanedFiles - #user#" preview

When piping in the "gam print users issuspended false", with the preview flag, a CSV is generated with everything that the collect orphans command is going to move. As expected.

However, with the preview flag removed, the CSV is generated but it is completely blank. Not even headers. (different CSV name used)

I can confirm from Drive reports and the audit logs that the folder was created and files moved. So it's still doing everything else that it's supposed to do, just no report.

Is there something I am doing wrong here, or am I hitting a bug?

I'm on version 7.03.08.

Ross Scroggs

unread,
Oct 2, 2025, 1:15:56 AM (4 days ago) Oct 2
to google-ap...@googlegroups.com
I have a few minutes right now (10:15 PM PDT) or in the morning startinh=g at 7:30AM PDT)
Send me a privae Meet/Zoom invitation and I'll help.

Ross
----
Ross Scroggs



--
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 visit https://groups.google.com/d/msgid/google-apps-manager/ab9130b7-8c54-4f66-bce5-e4cbaa68324en%40googlegroups.com.

Dane Connor

unread,
Oct 2, 2025, 1:22:41 AM (4 days ago) Oct 2
to GAM for Google Workspace
I'll send you through one for the morning. Thanks Ross.

Ross Scroggs

unread,
Oct 2, 2025, 1:25:02 AM (4 days ago) Oct 2
to google-ap...@googlegroups.com
Without the preview you want:

gam print users issuspended false fields primaryEmail | gam redirect stdout "C:\temp\orphanfiles1.txt" multiprocess redirect stderr stdout csv - gam user ~primaryEmail collect orphans targetuserfoldername "OrphanedFiles - #user#"

Better yet:
gam config auto_batch_min 1 redirect stdout "C:\temp\orphanfiles1.txt" multiprocess redirect stderr stdout all users_ns collect orphans targetuserfoldername "OrphanedFiles - #user#"

7.03.08 is way out of date,  current is 7.23.04



Ross
----
Ross Scroggs


On Oct 1, 2025, at 10:07 PM, 'Dane Connor' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Ross Scroggs

unread,
Oct 2, 2025, 1:26:48 AM (4 days ago) Oct 2
to google-ap...@googlegroups.com
I've joined if you're still vailable.

Ross
----
Ross Scroggs


Dane Connor

unread,
Oct 2, 2025, 1:27:52 AM (4 days ago) Oct 2
to GAM for Google Workspace
Legend!

I'll give this a shot in the next few days when I have another tenant to run it for and save you the 7:30am Meet (12:30am for me).
Reply all
Reply to author
Forward
0 new messages