delete files

 

How can I delete a file outside de MetaTrader directory using MQL?

Thanks

 
You'lll have to make a call to a Windows DLL... I'm not sure which DLL or which call, sorry.
 
It works!

Here is the code:


#import "kernel32.dll"
 int DeleteFileA(string file);
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
  //

//activate 
//winapi.
//deletefile
DeleteFileA("C:\Arquivos de programas\test.txt");
//----
   return(0);
  }




Thanks!
Reason: