Is there any way to FileOpen in another folder?

 

I found that MT4 can read files with FileOpen only in Files folder in MT4 terminal.

Is that true?

Is there any way to read files in another folder ?


int FileOpen( string filename, int mode, int delimiter=’;’)
 

Perhaps you should read the manual. FileOpen - File Functions - MQL4 Reference

Note For security reasons, work with files is strictly controlled in the MQL4 language. Files with which file operations are conducted using MQL4 means, cannot be outside the file sandbox.

   How To Ask Questions The Smart Way. (2004)
      How To Interpret Answers.
         RTFM and STFW: How To Tell You've Seriously Screwed Up.

 
Cromo:

I found that MT4 can read files with FileOpen only in Files folder in MT4 terminal.

Is that true?

Is there any way to read files in another folder ?


You can't do it with FileOpen but it's possible using WinAPI. This article is quite old and some code examples might be outdated but you will get the idea.

https://www.mql5.com/en/articles/1540

File Operations via WinAPI
File Operations via WinAPI
  • www.mql5.com
Environment MQL4 is based on the conception of safe "sandbox": reading and saving files using the language are allowed in some predefined folders only. This protects the user of MetaTrader 4 from the potential danger of damaging important data on the HDD. However, it is sometimes necessary to leave that safe area. This article is devoted to the problem of how to do it easily and correctly.