Backup flow - need help

Post your questions and help other users.

Moderator: Martin

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Backup flow - need help

Post by Martin » 29 Sep 2015 13:22

Sorry, I did not check. It seems like the -n option was added in Android 6.0. It's not available on 5.0 and 5.1.1.

eldron
Posts: 45
Joined: 27 Apr 2015 08:21

Re: Backup flow - need help

Post by eldron » 29 Sep 2015 14:56

So at the moment there would be no way to start a copy job via automagic that does not overwrite the target files?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Backup flow - need help

Post by Martin » 01 Oct 2015 11:36

You could write a flow that loops over the list of files one by one and checks whether the file exists in the target location and skips it, however it could become slow when you want to copy many files. You would likely have to increase the emergency stop count in the flow options for such a flow.

eldron
Posts: 45
Joined: 27 Apr 2015 08:21

Re: Backup flow - need help

Post by eldron » 01 Oct 2015 14:15

I think I´ll just wait and see if it´ll be implemented in automagic one day ;-)
It´s not like it doesn´t work, it would have just made the backup faster when using it more than once.

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Backup flow - need help

Post by MURTUMA » 01 Oct 2015 16:58

Instead of creating my own topic, I'll just hijack this as my problem is related.

I have never managed to get the loops working in a script so I'd be grateful if you could give a simple example script with detailed explanations.

File_list1: SD/test1/1,.../2,.../3,.../4
File_list2 contains files 1 and 3 already.

How can I compare the lists and remove the entries in the list2 from the list1? This is to prevent backuping the already present files. In this case, only 2 and 4. I somewhat know, how to use regexp to extract the file names, but if there's more universal way to do it, I'll gladly hear it too.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Backup flow - need help

Post by Martin » 03 Oct 2015 12:56

You can remove the elements contained in one list from another list by writing a loop and calling removeElementValue(list, elementToRemove) for each element or you can use removeAllElementValues:

Code: Select all

list1=newList(1, 2, 3, 4);
list2=newList(1, 3);
removeAllElementValues(list1, list2);
list1 will only contain values 2 and 4 when the script is executed.

Post Reply