Go Back   Android Forums > Android Discussion > Android Applications > Tasker

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

Like Tree2Likes
  • 1 Post By CodeMonkey
  • 1 Post By XplosiV

test: Reply
 
LinkBack Thread Tools
Old January 14th, 2013, 09:16 PM   #1 (permalink)
Master X is Watching You
Thread Author (OP)
 
XplosiV's Avatar
 
Join Date: Jun 2010
Location: UK
Gender: Male
Posts: 5,412
 
Device(s): Galaxy S3 16GB Blue (x2) 4.1.1 ****** Galaxy mini ****** Galaxy Tab 8.9, ****** Galaxy Portal 2
Carrier: T-Mobile UK!

Thanks: 723
Thanked 1,961 Times in 1,531 Posts
Send a message via Yahoo to XplosiV xplosiv.ss@gmail.com
Default [Solved] Tasker - File Copy (not so fun)

So after having suffered from the S3's little nand memory eppy fit and corrupting, I figured if get tasker and see if I can set up some kind of backup thingy-mo-jiggy.

Alas it seems pretty much impossible for me, so can anyone help? A click by click - step by step would be much appreciated.

The aim:

Copy files from one directory to another. Namely along the lines of;

From
/storage/sdcard0/dcim/

To
/storage/extsdcard/backup

The files could be .jpg or .jpeg so do I also need to set up variables so both will copy?

Much thanks, hope someone can help before I go completely insane.

__________________




XplosiV is offline  
Last edited by XplosiV; January 17th, 2013 at 10:30 AM.
Reply With Quote
sponsored links
Old January 15th, 2013, 08:18 AM   #2 (permalink)
Junior Member
 
Join Date: Oct 2012
Posts: 92
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 12 Times in 12 Posts
Default Re: Tasker - File Copy (not so fun)

Wouldn't it be so much easier to use a file manager or USB than tasker??
tatootie67 is offline  
Reply With Quote
Old January 15th, 2013, 03:39 PM   #3 (permalink)
Senior Member
 
CodeMonkey's Avatar
 
Join Date: Dec 2008
Location: On the sofa
Posts: 562
 
Device(s): Nexus 4 (stock), Nexus Galaxy (retired), Atrix (ret.), N1 (ret.), Magic (ret.), G1 (ret.)
Carrier: Not Provided

Thanks: 13
Thanked 102 Times in 86 Posts
Default Re: Tasker - File Copy (not so fun)

I do something along these lines but using a third party app to do the grunt work, Foldersync.

My profile fires at 5am each morning if the phone is in my "sleep" mode and connected to my home WiFi.
It pings my server, wakes it up if it does not respond (using another third party plugin) and then fires a Foldersync profile to backup my phone files to a designated user area on the server. A notification alert is then left on the phone to indicate success / failure and launch Foldersync if pressed.
__________________
Monkey see, monkey do.

CodeMonkey is online now  
Reply With Quote
The Following User Says Thank You to CodeMonkey For This Useful Post:
XplosiV (January 15th, 2013)
Old January 15th, 2013, 04:04 PM   #4 (permalink)
Master X is Watching You
Thread Author (OP)
 
XplosiV's Avatar
 
Join Date: Jun 2010
Location: UK
Gender: Male
Posts: 5,412
 
Device(s): Galaxy S3 16GB Blue (x2) 4.1.1 ****** Galaxy mini ****** Galaxy Tab 8.9, ****** Galaxy Portal 2
Carrier: T-Mobile UK!

Thanks: 723
Thanked 1,961 Times in 1,531 Posts
Send a message via Yahoo to XplosiV xplosiv.ss@gmail.com
Default

Quote:
Originally Posted by tatootie67 View Post
Wouldn't it be so much easier to use a file manager or USB than tasker??
I could as I'm paid up with root explorer, but the whole point of tasker was to make it automated or done via a widget.

Quote:
Originally Posted by CodeMonkey View Post
I do something along these lines but using a third party app to do the grunt work, Foldersync.

My profile fires at 5am each morning if the phone is in my "sleep" mode and connected to my home WiFi.
It pings my server, wakes it up if it does not respond (using another third party plugin) and then fires a Foldersync profile to backup my phone files to a designated user area on the server. A notification alert is then left on the phone to indicate success / failure and launch Foldersync if pressed.
Yeah, that sounds good, maybe a little more for what I need. What's really frustrating is its all but one line of code in MS-DOS so you'd think something can be scripted to do the same in Android. Tasker just makes a meal out of it for code n00bs which is unfortunate, and the help fan's are next to useless.
XplosiV is offline  
Reply With Quote
Old January 15th, 2013, 04:12 PM   #5 (permalink)
Senior Member
 
CodeMonkey's Avatar
 
Join Date: Dec 2008
Location: On the sofa
Posts: 562
 
Device(s): Nexus 4 (stock), Nexus Galaxy (retired), Atrix (ret.), N1 (ret.), Magic (ret.), G1 (ret.)
Carrier: Not Provided

Thanks: 13
Thanked 102 Times in 86 Posts
Default Re: Tasker - File Copy (not so fun)

Quote:
Originally Posted by XplosiV View Post
Yeah, that sounds good, maybe a little more for what I need. What's really frustrating is its all but one line of code in MS-DOS so you'd think something can be scripted to do the same in Android. Tasker just makes a meal out of it for code n00bs which is unfortunate, and the help fan's are next to useless.
Well I develop software for a living but I didn't fancy reinventing the wheel so went for the plugin solution
XplosiV likes this.
CodeMonkey is online now  
Reply With Quote
Old January 15th, 2013, 04:41 PM   #6 (permalink)
Junior Member
 
Join Date: Jan 2013
Posts: 30
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 10 Times in 10 Posts
Default Re: Tasker - File Copy (not so fun)

try the rsync tasker plugin. it is not complicated if you know how to use rsync and ssh, and it is the handiest backup solution I've used on android.

basically I dump the backups in some predetermined folders on the phone/tablet, and then when titanium backup fires a notification for completed weekly backup, tasker rsyncs everything to the home file server. setting up a context that responds to specific notifications is easy.

the only minor problem is that the plugin doesn't seem to recognize tasker variables, so you're limited to one backup path per task.
userloser is offline  
Reply With Quote
The Following User Says Thank You to userloser For This Useful Post:
XplosiV (January 15th, 2013)
Old January 15th, 2013, 05:47 PM   #7 (permalink)
Master X is Watching You
Thread Author (OP)
 
XplosiV's Avatar
 
Join Date: Jun 2010
Location: UK
Gender: Male
Posts: 5,412
 
Device(s): Galaxy S3 16GB Blue (x2) 4.1.1 ****** Galaxy mini ****** Galaxy Tab 8.9, ****** Galaxy Portal 2
Carrier: T-Mobile UK!

Thanks: 723
Thanked 1,961 Times in 1,531 Posts
Send a message via Yahoo to XplosiV xplosiv.ss@gmail.com
Default

I finally got it sorted.

Apparently my line of thinking was too complex. Maybe partly due to some examples I'd seen referencing specifying specific file extensions.

Anyhow. To answer my own question. Here is a quick how to:

With File Magic installed (not sure if it's used but hey)
Open tasker.
Create a profile.
Specify TIME
input desired time (00:30) for FROM
tick repeat
Untick TO

This will run the TASK until it's competed.

Now tap TASKS
Add new
Select file
Select COPY DIR
Tap the magnifying glass to the right of FROM
Tap the bottom right arrow to go to the list of drives
Select drive (in my case sdcard0)
Select folder DCIM by LONG PRESSING
Tap the magnifying glass to the right of TO
Tap the bottom right arrow to go to the list of drives
Select drive (in my case extsdcard)
Select folder BACKUP by LONG PRESSING
Tap the green tick.

Rinse and repeat for any other folders you want, changing the source folders as needed.

My backup takes about 4-5 min's to complete but it copies all files within source directories to the external sd card into the folder Backup. No root required (unless you want to backup root required files)

Thanks for your help guys and girls.
davoid likes this.
XplosiV is offline  
Reply With Quote
The Following 4 Users Say Thank You to XplosiV For This Useful Post:
CarsnGadgets (July 1st, 2013), davoid (January 16th, 2013), javamann (February 13th, 2013), MrNice (March 10th, 2014)
Old January 17th, 2013, 12:48 PM   #8 (permalink)
ROM Developer
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,320 Times in 3,994 Posts
Default Re: [Solved] Tasker - File Copy (not so fun)

I too use foldersync. I don't even use it as a tasker plugin. Stand alone is fine.

I use cron and rsync on Linux though.
SUroot is offline  
Reply With Quote
Old March 9th, 2014, 07:12 AM   #9 (permalink)
New Member
 
Join Date: Mar 2014
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 2 Times in 1 Post
Default Already solved - but alternative

I understand this was already solved. However, I found a stand-alone Tasker method to accomplish the same thing, so for anyone looking, try this:

I wanted a way to back up my camera pictures, contact files (lost too many contacts because of "trial" address books and of course, ALL my Tasker settings (tasks, profiles, scripts, etc). Since Foldersync doesn't always work for me, I prefer to move files around myself to my different storage areas. This allows me to do that at my convenience.

Since each is contained in it's own folder, I don't have a huge list of files that I don't know what they are / do. Don't delete the back-up folder, just move the contents inside. I found that to be a lot faster...but you can easily modify this to fit your needs.


Profile: Saturday back-up
From 00:00 - 00:02 (can be changed to fit your needs / phone speed)
+
Saturday

Task: Saturday back-up
Create directory
Dir back-up/contacts
Run Shell
Command sh /shcard/tasker/scripts/backup.sh
Copy dir
From Tasker/
To back-up/Tasker
Copy dir
From DCIM/Camera
To back-up


And the backup script
backup.sh (can be created using any text file editor
mv /sdcard/contact*.vcf /sdcard/back-up/Contacts


Automatically runs once a week. Very convenient for me without a lot of extra programs clogging up my phone and draining the battery.
Droidwalking is offline  
Last edited by Droidwalking; March 9th, 2014 at 07:17 AM.
Reply With Quote
The Following 2 Users Say Thank You to Droidwalking For This Useful Post:
codesplice (March 10th, 2014), D-U-R-X (March 9th, 2014)
Reply


Go Back   Android Forums > Android Discussion > Android Applications > Tasker
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:51 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.