How can I open template .tpl file from templates directory using MQL4 FileOpen() function?

 

I am trying to write MQL4 code to modify .tpl file from templates directory.

However, I am not able to open any .tpl file from template directory using FileOpen() function.

file name specified in FileOpen only opens  files from MQL4/File directory but it can NOT open file from templates.

Can someone suggest how can I read .tpl file and modify and put it back to the templates directory?

 

Hi and good morning,

as i know, it is not allowed to open files outside the MQL/File directory in MQL4 (for security reasons)
The only way may be to use a dll and the WinAPI.

Best regards

 
Or create a hard link between the template file and MQL4/File/«whatever» and modify that.
Reason: