I've been searching around and can't seem to find what I'm trying to do. Not sure if it's even possible, but I'm looking for a Google Script that would probably run on a time-based trigger, say everyday at 4:00am that will grab a single folder from the users Desktop computer and automatically back it up to the Drive.
Is something like this possible? Can GAS access files that are located on a users computer, not just on their Google Drive?
Thanks in advance.
Sean.
It is impossible to do with scripts, but you might want to look into http://www.duplicati.com/
It's open source and works well for one-way upload (ie. backup)
The way to do it will be to use the Google Drive API.
You can choose from may languages in order to implement it.
Related
I'm setting up a google spreadsheet to give my client to use.
However, we both are using organization ID's meaning that we cannot directly share our sheets to one another.
So, I have to download and send the google spreadsheet but the formulas and app scripts break if I download it as an xlsx file.
Is there a way to share the file??.. I don't want to have to borrow my client's laptop and do the process over again.
(BTW, of course there's no such option as "Set the sheet public" or "Allow anyone with link to access")
I'd really appreciate your help. Thanks in advance.
It sounds like you may want to share files that have restrictions in place to prevent them from being shared.
Thankfully there seems to be no way to do that.
As a workaround you could potentially manually copy the data and script into a new sheet, you would now be the owner, leaving you the possibility of sharing it. Though of course, you should check with your admin to ensure that this is not violating any company policy.
I'm writing from Italy (sorry for mistakes), my question is about GOOGLE DRIVE API and
I'm writing here because the G-Suite support wrote me to contact you, I'm not a programmer.
The big question is: how can I browse folders and files uploaded on my Google Drive Api?
I write you what apppened.
I wanted to use a backup program to save in a planned way files and folders an Google Drive.
I downloaded the program (Iperius Backup) and followed the instructions.
To understand on what I did, I paste the link of the instructions below:
http://www.iperiusbackup.net/en/backup-to-google-drive/
http://www.iperiusbackup.net/en/how-to-enable-google-drive-api-and-get-client-credentials/
I tried the software and everything worked.
So I opened Google Drive but the back-upped files weren't there.
Seen that there was something not clear, I have erased all the files on my Google Drive. I wanted to make sure that it was empty, hoping to erase also “hidden files”(...even if I thought it wouldn't have been so simple...)
To make sure that everything was erased (also “hidden files”), I tried to restore files from the backup software but unfortunately, the software worked well...the files were still there, somewhere...
This means that I have saved through the backup software files and folders on Google Drive “Api”, but I cannot manage them.
How can I have access to my space in Google Drive Api and erase all my files and folders that are still there?
Thank you in advance for the help,
best regards,
Stefano
To list all files in your drive, you can use Files: list.
This method accepts the q parameter, which is a search query
combining one or more search terms. For more information, see the
Search for Files and Team Drives guide.
You can use the Try it now or use the sample code given in a specific language you are using.
To delete/erase a file, use Files: delete.
Permanently deletes a file by ID. Skips the trash. The currently
authenticated user must own the file or be an organizer on the parent
for Team Drive files. Try it now or see an example.
I'm not a savvy coder, so this is quite a challenge to me, but I'm trying to get this to work anyway:
I'm preparing a registration form on Google Forms. People will insert their personal data and, in the end, I would need people to be able to upload a few files (a photo, a CV, etc...). Such files would be stored on Google Drive.
Now, I've seen that there seems to be no straightforward way of doing it on Google Forms. I was thinking that my only option would be to try and get it done with Google Scripts and then embed that script inside my Google Form.
Is this possible? Can anyone help me with this?
Many, many thanks in advance!
In case you have a Google bussines account, you can create a file upload question type. See the announce here https://gsuiteupdates.googleblog.com/2016/10/five-new-ways-to-reach-your-goals.html
I am trying to prevent deletion of all files uploaded to specific folder in Google drive. The idea is several people will be able to upload files to this drive, but they should never be able to delete it.
I thought of putting a Google apps script to achieve this, like letting the script run every x interval and getTrashedFiles and set isTrashed to false. But what if the user is able to delete it from trash too?
Is there a foolproof way?
Or is Google Drive not the right answer at all?
Any other service can help me which is simple for people uploading the files?
TIA
its possible but the way you are doing it isnt practical or tamperproof.
instead write a little apps script webapp that allows uploading files to the given folder where you are owner and only writter.
publish it to run as you with permissions to anyone (or your domain). they will be able to add files and view but not change or remove them (and you will be the owner of all uploaded files).
to support uploading files already in drive (move them to the folder) is also possible but with more code.
Does anyone know if it would be possible to set up a script on my Google account that triggers when a new item is shared to the email and then automatically shares it with another email address?
I use a personal Gmail account, but whenever I do school work documents are always shared with my school email and it is a pain to have to share everything manually or keep switching accounts.
When I looked a few weeks back I was unable to find a way to have a script trigger on new shared items, but I am new to these scripts so if anyone has a suggestion I would appreciate it. Thanks!
I don't think you can actually triggers on new items. But you can write a script to read the Drive feed to easily check if there's new files.
Such script would still have to be triggered on a time-driven basis, so you wouldn't have "instant" access on your second account. Also, if I'd write such script, I would just create a folder, share it with the desired accounts, then use the script just to move the files to this folder. This approach has the benefit of easily allowing you to check which files are shared (with your specific account) and which aren't. And since folders are actually just labels in Drive, it is not any problem if you like or need to have your files organized in another folder structure.
By the way, have you seen Chrome users feature? It helps a lot when working with multiple accounts.