Would be nice if you could add an function that creates unique file names to prevent overwriting.
(file(1).txt , file(2).txt...)
Or maybe even better to add it as option to 'Write to File' action.
Thank you.
uniqueFileName()
Moderator: Martin
-
- Posts: 19
- Joined: 14 Sep 2013 18:41
Re: uniqueFileName()
still no reply(?).. sry if request was nonsense.
Re: uniqueFileName()
Sorry, no nonsense, I just usually don't have the time to reply to every feature request.
You could use a loop in a script and function existsFile to create a unique file name on your own.
Another option would be to include the date/time in the file name to avoid naming problems: file_{triggertime,dateformat,YYYYmmdd_HHmmss}.txt
Regards,
Martin
You could use a loop in a script and function existsFile to create a unique file name on your own.
Another option would be to include the date/time in the file name to avoid naming problems: file_{triggertime,dateformat,YYYYmmdd_HHmmss}.txt
Regards,
Martin
-
- Posts: 19
- Joined: 14 Sep 2013 18:41
Re: uniqueFileName()
Thanks for answering.
I didnt actually realize we only need a few lines of code to cover this case.
saveTo = "/storage/emulated/0/file({i = convertNull(i, 1)}).txt";
while (existsFile(saveTo))
{ saveTo = "/storage/emulated/0/file({i = i + 1}).txt";
}
Thank you again.
MFG!
I didnt actually realize we only need a few lines of code to cover this case.
saveTo = "/storage/emulated/0/file({i = convertNull(i, 1)}).txt";
while (existsFile(saveTo))
{ saveTo = "/storage/emulated/0/file({i = i + 1}).txt";
}
Thank you again.
MFG!