MQL4 Reference
File functions
FileDelete
| 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);
}
|
|
|