How to clear the contents in a file every time before writing g to it

Hi,Can any one help ,how to clear the conents in a file before writing to file every time

hi.
i hope you asking for csv file. if this is the case then just type "w" on the second parameter of the fopen function

fh = fopen( "myfile.txt", "w");
2 Likes

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.