ericyd / gdrive-copy

Web app to copy a Google Drive folder
https://script.google.com/macros/s/AKfycbxbGNGajrxv-HbX2sVY2OTu7yj9VvxlOMOeQblZFuq7rYm7uyo/exec
MIT License
1.58k stars 342 forks source link

A question about how it works, and a thanks. #169

Closed ghost closed 4 years ago

ghost commented 4 years ago

I'm a bit of a slowpoke, but i was wondering how does this app work, specifically about moving contents between one domain to another? Does it like temporary downloading the files onto your machine and put it onto the other drive? Or does it like execute a bunch of commands to make Google work and put those files onto the other drive?

And by the way, i'd like to send my thanks to you. You saved my buns with this. I wish i could send a few bucks to you, but my payment options are limited. ( i'm still under parental guardians' management so i can't really pay anything that's virtual and outside of my country. )

ericyd commented 4 years ago

No worries, I'm not accepting payment anymore for this app now that I'm not maintaining it anymore.

The short version is it uses Google Apps Script to host and execute the essential processes. It uses Triggers to schedule the job, and the Drive API to list files in the folder and recursively copy them.

It's not a very well-structured app but it essentially is one large script that runs from the main function. It saves data in the user's own Google Drive in a JSON file to keep track of it's own progress, and also uses Google Apps Script's Properties store, which is limited to a specific user's account, for some additional metadata.