Page 1 of 1

uplaod to dropbox

Posted: 05 Oct 2019 17:11
by medhassano
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

Re: uplaod to dropbox

Posted: 06 Oct 2019 17:17
by Desmanto
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.

Re: uplaod to dropbox

Posted: 06 Oct 2019 22:01
by medhassano
Sorry, still same problem

Re: uplaod to dropbox

Posted: 09 Oct 2019 18:09
by Desmanto
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.

Re: uplaod to dropbox

Posted: 10 Oct 2019 14:57
by medhassano
Thank you