working_folder=TerminalInfoString(TERMINAL_DATA_PATH)+"\\MQL5\\Files"; FolderDelete(working_folder);
For security reasons, work with files is strictly controlled in the MQL5 language. Files with which file operations are conducted using MQL5 means cannot be outside the file sandbox.The file function only work in the sandbox (MQL5\Files or Tester\Files) You can't delete the Files folder. You can delete folders below that, but drop the working_folder.
File Functions - Reference on algorithmic/automated trading language for MetaTrader 5- You enabled cloud computing and someone else created a file. cloud.mql5.com/
Hi whroeder,
thanks for your comment.
I tried to delete a test Folder as well as a M.mq5 file using relativ and absolute pathes but none worked. FIleisExist always returns false. Any idea how to use relativ path to delete those two files?
int OnInit() { FolderDelete("Files\\test"); Print("Exists: ", FileIsExist("Files\\M.mq5")); return(INIT_SUCCEEDED); }
syrvn 0: I tried to delete a test Folder as well as a M.mq5 file using relativ and absolute pathes but none worked. FIleisExist always returns false. Any idea how to use relativ path to delete those two files?
FolderDelete("Files\\test"); Print("Exists: ", FileIsExist("Files\\M.mq5"));
What part of "but drop the working_folder." was unclear?
FolderDelete("test"); Print("Exists: ", FileIsExist("M.mq5"));
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I try to delete, for instance, the file Folder as follows:
Print out returns the following string:
Why the hell is MQL5 adding this Agent- thing after the SandBox ID?