It's a small piece of software to Sync files between your device and google cloud. I created this as the way google drive sync works doesn't suit my needs.
It uses .net 8 and Google apis
-
This app is not an active sync app, and will not keep syncing your files. You need to run it again every time you want to sync the files. Alternatively you can create a batch to run on start/shutdown to sync the files.
-
Before overriding the files in your local/cloud it will compare the last modified date of both files, in order to avoid overriding the newest version.
Follow the steps from this youtube video up to when Ivan downloads the credentials file at 53 seconds.
Move this file to the root folder of the app and rename to credentials.json
Below is a sample on how the file will look like:
{
"installed": {
"client_id": "test-test.apps.googleusercontent.com",
"project_id": "test-test-324234234",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "THERE_WILL_BE_A_CLIENT_SECRET_HERE",
"redirect_uris": [
"http://localhost"
]
}
}
Once you unzip the release folder, you'll find a config file called appsettings.json, which has the section below. You can add as many mappings as you want.
"SyncBackup": {
"Mappings": [
{
"CloudFolderParentId": "",
"CloudFolderParentName": "",
"LocalFolder": "",
"CloudFolder": "",
"ActionType": 0,
"FilesToSync": []
}
]
}
In order to fill CloudFolderParentId & CloudFolderParentName, you will need to go to your gdrive and create a new base folder or use an existing one, and navigate inside.
Property name | Description |
---|---|
CloudFolderParentName | Base folder name you just created/opened |
CloudFolderParentId | Copy the Id at the end of the URL when you're inside of a folder |
LocalFolder | Full local path to the files you want to download/upload |
CloudFolder | Folder name you want to upload/download files on gdrive |
ActionType |
|
FilesToSync | In case you only want to sync specific files from a folder, you need to add their name and extension here, you can select multiple files by separating them using a comma. ex: "save1.txt, save2.txt, save3.txt" By populating this property, it will only sync the top folder and the selected files but not its nested folders. |