>Maybe DO WHILE TXT file !exist then erase.
>
>AT
A reasonable wait should be appropriate.
I had a similar situation in Bata-Bolivia. For the preview of a report, in text mode, I used either the default program for .TXT, or the default program for .HTM files.
Instead of a wait state, I added an element to a global Timer array. This Timer erased the text file after 2 minutes. Then, the Timer destroyed itself. On program exit, the Timers' events were executed as well.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)