Step 2 — Master file/folder inventory.
Prints every file and folder under the source folder with full
metadata and resolved file paths, then writes the results to the
specified Google Sheet tab.
Fields returned: id, name, mimeType, owners, parents, size,
modifiedTime, createdTime, trashed. `filepath` resolves the full
path from root. `excludetrashed` omits deleted content.
NOTE: If the user has not yet created a Google Sheet, instruct them
to create one named "Migration Audit" with tabs: file_audit,
all_permissions, file_count, own, not_owner, external_owner,
public_files, shortcuts, shared_drive_members, migration_log,
post_migration_permissions.
Args:
user_email: The email of the user who owns the source folder.
folder_id: The ID of the source folder to audit.
sheet_id: The ID of the Google Sheet for output.
sheet_name: The tab name to write to (default: "file_audit").
GAM command:
gam user <user_email> print filelist select <folder_id>
fields "id,name,mimeType,owners,parents,size,modifiedTime,
createdTime,trashed" filepath excludetrashed
todrive tdfileid <sheet_id> tdsheet "<sheet_name>"
tdupdatesheet tdretaintitle