MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  File functions  FileDelete

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
void FileDelete( string filename)
Removes specified file name. To get the detailed error information, call GetLastError().
Files can only be deleted if they are in the terminal_dir\experts\files directory (terminal_directory\tester\files, in case of testing) or its subdirectories.
Parameters:
filename   -   Path to the file.
Sample:
  // file my_table.csv will be deleted from terminal_dir\experts\files directory
  int lastError;
  FileDelete("my_table.csv");
  lastError=GetLastError();
  if(laseError!=ERR_NOERROR)
    {
     Print("An error ocurred while (",lastError,") deleting file my_table.csv");
     return(0);
    }