Capture Drive filepaths over 400 Characters

290 views
Skip to first unread message

Jared Mayer

unread,
Sep 13, 2022, 9:25:32 PM9/13/22
to GAM for Google Workspace
Hey community,

I know someone looking at moving from Google Drive to Sharepoint/OneDrive which has a restriction of maximum 400 characters for a path length. 

Is there any way to extract and report on files with a longer fullpath/filepath of more than 400 characters? 

Im aware could print a filelist of everyone with fullpath, (all 2million files+) and then audit the filepath length but hoping for something simpler (not that I could find). 

Thanks
Jared

Ross Scroggs

unread,
Sep 13, 2022, 10:41:23 PM9/13/22
to google-ap...@googlegroups.com
Jared,

There is nothing at the moment. I can add something to csv_output_row_filter "path.0:length>400"

Ross
----
Ross Scroggs



The information contained in this email is privileged and confidential and intended for the addressee only. If you are not the intended recipient, please respect that confidentiality and do not disclose, copy or make use of its contents. If received in error, please destroy this email and contact the sender immediately. Thank you.

--
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/82d33812-1c00-4a54-aaa1-ec9178719b07n%40googlegroups.com.

Ross Scroggs

unread,
Sep 13, 2022, 11:45:50 PM9/13/22
to google-ap...@googlegroups.com
Jared,

In 6.26.14 (building as we speak) you'll be able to do:
gam config csv_output_row_filter "path.0:length>400" user us...@domain.com print filelist fields id,name filepath

<RowValueFilter> ::=
        [(any|all):]length<Operator><Number>|
        [(any|all):]lengthrange=<Number>/<Number>|
        [(any|all):]lengthrange!=<Number>/<Number>|

Ross

----
Ross Scroggs


On Sep 13, 2022, at 6:25 PM, 'Jared Mayer' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Jared Mayer

unread,
Sep 13, 2022, 11:54:05 PM9/13/22
to GAM for Google Workspace
Thank you Ross! Amazing work as always! 

I look forward at testing it in the coming days. 

Cheers
Jared

Ross Scroggs

unread,
Sep 14, 2022, 1:44:05 AM9/14/22
to google-ap...@googlegroups.com
Jared,

6.26.14 is available.

Ross
----
Ross Scroggs


Jared Mayer

unread,
Sep 18, 2022, 4:59:18 PM9/18/22
to GAM for Google Workspace
Thank you Ross! Amazing work as always! 

Tested within 6.26.17 and worked a treat. 

Cheers
Jared

Adrian Rodriguez

unread,
Sep 19, 2022, 5:43:33 AM9/19/22
to google-ap...@googlegroups.com

James SEYMOUR

unread,
Sep 19, 2022, 9:36:59 PM9/19/22
to GAM for Google Workspace
Hi Ross,

Does the message WARNING: csv_output_row_filter column "^path.0$" does not match any output columns indicate that there are no files with a filepath greater than 400?

Cheers

James

Ross Scroggs

unread,
Sep 19, 2022, 11:15:29 PM9/19/22
to google-ap...@googlegroups.com
James,

No, it indicates that there are no file paths at all; did you omit the filepath option at the end of the command?

Ross
----
Ross Scroggs


James SEYMOUR

unread,
Sep 19, 2022, 11:39:12 PM9/19/22
to GAM for Google Workspace
Thanks for the call Ross.

For people following this thread, the warning message indicates that there are no files matching the file length specified.

Also if 400 characters is the limit, then the filter needs to be greater than or equal to, so "path.0:length>=400". This will show path lengths of 400 and above.

Cheers

James

Ross Scroggs

unread,
Sep 19, 2022, 11:39:26 PM9/19/22
to google-ap...@googlegroups.com
James,

You're right, I'm wrong. The message does indicate that there are no files with a filepath greater than 400.

Ross
----
Ross Scroggs


Ross Scroggs

unread,
Sep 20, 2022, 3:51:57 PM9/20/22
to google-ap...@googlegroups.com
Jared/James,

The return code will be 0 if some file has a path length that matches the filter criteria, the return code will be 60 if no file paths match the filter criteria.

Ross

On Mon, Sep 19, 2022 at 8:39 PM Ross Scroggs <ross.s...@gmail.com> wrote:
James,

You're right, I'm wrong. The message does indicate that there are no files with a filepath greater than 400.

Ross
----
Ross Scroggs



On Sep 19, 2022, at 8:15 PM, Ross Scroggs <ross.s...@gmail.com> wrote:

James,

No, it indicates that there are no file paths at all; did you omit the filepath option at the end of the command?

Ross
----
Ross Scroggs



On Sep 19, 2022, at 6:36 PM, 'James SEYMOUR' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Does the message WARNING: csv_output_row_filter column "^path.0$" does not match any output columns indicate that there are no files with a filepath greater than 400?





--

Christian Busch

unread,
Apr 11, 2025, 7:42:46 PMApr 11
to GAM for Google Workspace
Im new here, getting an idea of GAM. I am having the same task: Migrate google shared drives to sharepoint. 
How do I sue this command? if I want to list all files & paths > 400 chars in a csv file? 

Christian Busch

unread,
Apr 11, 2025, 8:08:27 PMApr 11
to GAM for Google Workspace
figured it out: 
gam config csv_output_row_filter "path.0:length>=400" redirect csv ./Migration-files.csv multiprocess user us...@com.com print filelist select 0AGVA showownedby any fields id,name,fullfileextension,mimetype,ownernames,owners,title,size fullpath excludetrashed
Reply all
Reply to author
Forward
0 new messages