FORUMS
Remove All Ads from XDA

Sync folders from internal to google drive

52 posts
Thanks Meter: 4
 
By indestructible master, Member on 29th August 2019, 07:07 AM
Post Reply Email Thread
How i can set up Tasker to sync folder from my storage to cloud.
I know there are apps for that, but they sync just once, when file is added or deleted.
But i want to be able to upload it when it detects any changes in file.
To sync when wifi is available again, when i am not connected but i need it to sync files immediately when connected to wifi.
 
 
29th August 2019, 09:08 PM |#2  
ktmom's Avatar
Senior Member
Thanks Meter: 2,050
 
More
The "file modified" event will also monitor a directory. To select a directory, long press on the directory name when setting up the event.

In the following example, I use 2 profiles. One to set %FolderModified to "true" when the folder is modified. The second profile reacts to the %FolderModified variable AND a Wifi Connected state.

This means that whenever the Wi-Fi is connected, AND there has been a modification to the folder, the G-Drive sync will begin.

Note: I always use variables for sensitive data like the Gmail account in the File Modified Upload profile -> A1: GD Upload. This prevents an unintentional sharing of sensitive information. I do this for API keys, log in credentials, ect.

Profile: File Modified
Event: File Modified [
File:Backups/ ]
Enter: Folder Modified
A1: Variable Set [
Name: %FolderModified
To: true
Recurse Variables: Off
Do Maths: Off
Append: Off
Max Rounding Digits:3 ]


Profile: File Modified Upload
State: Variable Value [
%FolderModified ~ true ]
State: Wifi Connected [
SSID:*
MAC:*
IP:*
Active:Any ]
Enter: Tasker Gdrive Sync
A1: GD Upload [
Google Drive Account: %MyGdriveAcct
Data / File:Backups
Remote File Name:
Remote Folder:Tasker
Content Description:
Overwrite If Exists: Off
Publicly Share File: Off ]

A2: Variable Clear [
Name:%FolderModified
Pattern Matching: Off
Local Variables Only: Off ]

A3: Notify [
Title:Folder Uploaded To GDrive
Text:
Icon:null
Number:0
Permanent: Off
Priority:3 Repeat Alert: Off LED
Colour:Red
LED Rate:0
Sound File:
Vibration Pattern:
Category: ]
The Following User Says Thank You to ktmom For This Useful Post: [ View ] Gift ktmom Ad-Free
Post Reply Subscribe to Thread

Tags
file upload

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes