Hello,
on this flow, I would like to upload all files from the directory / data to Dropbox except the file being recorded audio, and after all deleting exception the file being recorded audio, my problem is that it deletes only one file and not all.
can I have a solution from you
Thank you
uplaod to dropbox
Moderator: Martin
-
- Posts: 22
- Joined: 26 Aug 2019 14:47
uplaod to dropbox
- Attachments
-
- IMG_20191005_171901.png (180.41 KiB) Viewed 10529 times
Re: uplaod to dropbox
The script before the delete files is not correct.
You should loop against the files, event if it is only 1 file.
Since this is dangerous action (delete), you should try with caution. Make sure you copy the file first, just in case it delete the wrong file. And make sure the path to delete is correct. Use condition debug dialog to check the {dellist} content before using it with delete files.
Code: Select all
dellist = newList();
if(length(files) > 1)
addElement(dellist, files[0]); // this will only add one file
Code: Select all
dellist = newList();
for(i in files)
addElement(dellist, files[0]); // this will all the files to the delete list
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: uplaod to dropbox
How many files do you have on that directory? Check the value of the {dellist} in debug dialog. Looking from your trigger is file observer, most likely this will have only one file per upload. Since it is triggered on every file write.
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.