When I tested your script reflected the above modification to the shared Drive, I could confirm that the script works.OwnerOfFile ? ownerOfFile.getEmail() : "", Most probably, you do not want to transfer everything, but if you do, select each folder and drag all of them to a new folder under the root directory named Export. To: var ownerOfFile = childFile.getOwner() You can pick which folders to back up with the All Drive data included option. There are a few more options underneath it you may find handy. Scroll down until you reach Drive and check the box next to it. ParentName + "/" + childFolder.getName() + "/" + childFile.getName(), Click Deselect All to only extract an archive of your cloud drive. OwnerOfFolder ? ownerOfFolder.getEmail() : ""Īnd also, please modify as follows. To: var ownerOfFolder = childFolder.getOwner() ParentName + "/" + childFolder.getName(), If my understanding is correct, how about the following modification? From: data = [ newName) // Make a recursive copy of all files/folders inside the source folder String query. If the option is available to use Sheets, youll see it as a dropdown option when you click the Export. I thought that this might be the reason of your current issue of your showing script. DriveFiles.list (Showing top 20 results out of 315). (Almost) every single export can be pushed into Sheets. But unfortunately, the owner of files and folders cannot be retrieved. But, fortunately, in the current stage, when the file ID and folder ID is used, the files and folders in the shared drive can be retrieved using Drive service (DriveApp). Or choose whatever other option is appropriate for your needs. I found a script that works flawlesly for My Drive that I want to adapt to also support Shared Drives. Instead, select Owned by Me to see all your own files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |