it seems that you can only open files inside the terminal's files folder (see https://docs.mql4.com/files/FileOpen). Additionally, in the "C" language the character '\' has a special meaning, which I don't know whether it is same in MQL4.
try this way:
handle=FileOpen("neg.csv",FILE_CSV|FILE_WRITE,';'); //or handle=FileOpen("\\forex\\neg.csv",FILE_CSV|FILE_WRITE,';'); // but forex must be a folder inside the "\files\" folder of the terminal. //or handle=FileOpen("/forex/neg.csv",FILE_CSV|FILE_WRITE,';'); // but forex must be a folder inside the "\files\" folder of the terminal. //in order to access files outside the terminal folder, you have to use the windows API. Search the forum for examples of API use.
it seems that you can only open files inside the terminal's files folder (see https://docs.mql4.com/files/FileOpen). Additionally, in the "C" language the character '\' has a special meaning, which I don't know whether it is same in MQL4.
try this way:
aha,ok - thanks.so I'll place a link into that folder.
have a nice weekend,
Carl
take looksee here and "If you still need to work outside the directories (defined for safety reasons), you can call the functions of Windows OS. For this purpose, the functions of API represented in kernel32.dll library are widely used...."
.
"Additionally, in the "C" language the character '\' has a special meaning, which I don't know whether it is same in MQL4."
is used as an escape char just like C: "\n" > NL, "\t" > TB, "\\" > "\"
in editor see MQL4 Reference - Basics - Data types - Literal constants
and MQL4 Reference - Basics - Data types - String constants
an interesting page IBM Informix ESQL/C Programmer's Manual
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
please enlighten me.
This failes with: "wrong file name"?
What would be a correct filename in the folder I want?
Thanks in advance!
Carl