1

Is it possible to move some documents from one Google account to another Google account using Google apps script with in the same same domain.

user562299
  • 21
  • 3
  • possible duplicate of [Transfer ownership of a file to another user in Google Apps Script](http://stackoverflow.com/questions/10796464/transfer-ownership-of-a-file-to-another-user-in-google-apps-script) – TrueWill Dec 22 '12 at 19:24

3 Answers3

2

I am sure that this tutorial and example code will help you to achieve this using Google Apps Script.

https://sites.google.com/site/appsscripttutorial/urlfetch-and-oauth/share-docs-between-domain-users

Waqar Ahmad
  • 3,716
  • 1
  • 16
  • 27
1

With Apps Script File services you can share a document to individuals or copy a document into a shared folder, but it order to change the Owner, you'll have to use the Drive Permissions API through REST/OAuth. You can do that via Apps Script using UrlFetch, but that requires a bit more heavy lifting.

Arun Nagarajan
  • 5,547
  • 1
  • 22
  • 19
1

There seems to be a library for that. I found the following on Google+

Drive Romain Vialard, Dec 2012

This service provides access to new methods for the Drive Service (DocsList). For now on users can get & add commenters on documents + transfer ownership.

https://sites.google.com/site/scriptsexamples/new-connectors-to-google-services/driveservice

Class File

Member Type Description

addCommenter String Adds a commenter to the given file. getCommenters String Returns all the commenters of the given file. getEditors String Returns all the editors of the given file. getLastModifiedByMe Date Returns the date this document was last modified by the current user. getLastViewed Date Returns the date this document was last viewed in a web browser by any user. getOwner String Returns the owner of the given file. getViewers String Returns all the viewers of the given file. transferOwnership String Transfer ownership to another user within the same domain

ScampMichael
  • 3,688
  • 2
  • 16
  • 23