Tweaking help
Moderator: Martin
Tweaking help
If i set a flow to auto zip files from numerous directories, how do i add an exception to miss directories that have no files to zip? Currently the flow just ends with errors at the point that it does not find any files.
Re: Tweaking help
How do you define the list of the files to be zipped? In a list object? If it is a list, you can loop check existFile() to each element and remove them from list if it doesn't exist. Or the easier logic is to add them to newList() if exists (since you can't remove element when looping). After the loop, the files only the ones those exist.
Code: Select all
ziplist = newList(
"/storage/emulated/0/Automagic/flows.xml",
"/storage/emulated/0/Automagic/widgets.xml",
"/storage/emulated/0/Automagic/variables.bin",
"/storage/emulated/0/Automagic/Resources",
"/storage/emulated/0/Automagic/Not Exist");
checkedlist = newList();
for(i in ziplist)
if(existsFile(i)) addElement(checkedlist, i);
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Tweaking help
Hmm.. thanks i will see if i can fidle with that. I dont know android scripting. I use this app in its simplest form from the selections available, (trigger, action and condition). I have a basic understanding because in hay day i have wrote several scripts in j2me and c++ but yeah i will see what i can do