Skip to content

You can use this Script to automatically upload files to your Google Drive Account

License

Notifications You must be signed in to change notification settings

Mattesackboy/Google-Drive-Auto-Uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Drive - Auto Uploader

You can use this Script to automatically upload a file to your Google Drive Account. For now, this script it's only meant for backing up a VPS and deleting the old one on Google Drive. It's more like a private project.

Setup

After cloning this project, you need to run:

npm i

After, you first need to get the credentials.json from Google Drive Docs, you just need to follow the first step to get it.

Then, setup the config.json.

{
    "trackFile": {
        "isEnabled": true,
        "deletePermanently": true
    },
    "filesInfo": {
        "localPath": "./files"
    },
    "otherSettings": {
        "aioUpload": false
    }
}
  1. trackFile:
  • isEnabled: If true, the script will save the the uploaded file's ID, and in the next execution will delete it from Google Drive.
  • deletePermanently: If trackFile isEnabled is setted to true and this option is enabled too, for every execution the trash can of Google Drive will be emptied.
  1. filesInfo:
  • localPath: The path of the file/s that will be uploaded. Can be a path to a Folder or to a File.
  1. otherSettings:
  • aioUpload: If true, the script will upload all the files at the same time on Google Drive, otherwise one at the time.

Do not delete resources folder, or delete files in it.

Files folder can be deleted, it contains a file just to test the script.

Usage

After setup, you can run this command to trigger the script

node .

License

MIT

About

You can use this Script to automatically upload files to your Google Drive Account

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published