Download MetaTrader 5

How to delete file content?

To add comments, please log in or register
Alain Verleyen
Moderator
31192
Alain Verleyen  
Comments that do not relate to the "File Operations: Reading CSV", have been moved into this topic.
amin_mohammadi
88
amin_mohammadi  

Hello,

How can I delete file contents?

Documentation on MQL5: File Functions / FileDelete
Documentation on MQL5: File Functions / FileDelete
  • www.mql5.com
File Functions / FileDelete - Documentation on MQL5
Alain Verleyen
Moderator
31192
Alain Verleyen  
amin_mohammadi:

Hello,

How can I delete file contents?

Open your file with WRITE attribute then close it.

   int fHandle=FileOpen("yourfile",FILE_WRITE);
   if(fHandle!=INVALID_HANDLE)
      FileClose(fHandle);
To add comments, please log in or register