uplaod to dropbox

Post your questions and help other users.

Moderator: Martin

Post Reply
medhassano
Posts: 19
Joined: 26 Aug 2019 14:47

uplaod to dropbox

Post by medhassano » 05 Oct 2019 17:11

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
Attachments
IMG_20191005_171901.png
IMG_20191005_171901.png (180.41 KiB) Viewed 1138 times

User avatar
Desmanto
Posts: 2036
Joined: 21 Jul 2017 17:50

Re: uplaod to dropbox

Post by Desmanto » 06 Oct 2019 17:17

The script before the delete files is not correct.

Code: Select all

dellist = newList();
if(length(files) > 1)
  addElement(dellist, files[0]); // this will only add one file
You should loop against the files, event if it is only 1 file.

Code: Select all

dellist = newList();
for(i in files)
  addElement(dellist, files[0]); // this will all the files to the delete list
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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

medhassano
Posts: 19
Joined: 26 Aug 2019 14:47

Re: uplaod to dropbox

Post by medhassano » 06 Oct 2019 22:01

Sorry, still same problem

User avatar
Desmanto
Posts: 2036
Joined: 21 Jul 2017 17:50

Re: uplaod to dropbox

Post by Desmanto » 09 Oct 2019 18:09

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), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

medhassano
Posts: 19
Joined: 26 Aug 2019 14:47

Re: uplaod to dropbox

Post by medhassano » 10 Oct 2019 14:57

Thank you

Post Reply