How to download a file without overwriting previous file?

Hi Boss @bodymindpower
I have a question… this blocks work perfectly and you extension ASD, but.
how can i do… when download file always add -1 and not update first file, for example:

original file is: “control.csv” and when i downloading newly, this dowload how : control-1.csv, control-2.csv, control-3.csv…
Any solution for update the same file? please!

sorry for my bad english.

use the File.Exists method to find out, if the file already exists
if yes, add 1 and check again, if it again exists, if yes, add 1 and check again, etc.

Taifun

Thx u Mr taifun.

but, how can i always replace the same file?

I’m not sure, if I understand, what you are trying to say…
what about trying something and showing us your blocks?
Taifun

i use one database in .csv
when i update the data,then download file newly to phone.
And the original file is never replaced. So my app read always original database and not the update file.

for example original database is 08082021.csv:

I need please, overwrite the original file always

I really need to do the opposite.
whenever I download the updated file, it will replace the old one or the original one

Maybe try to check if file exists. If true then before downloading first delete and then download

This post was flagged by the community and is temporarily hidden.

This post was flagged by the community and is temporarily hidden.