Can anyone spot why this code does not work, I get an invalid handle, the file does exist.
Steve
Can anyone spot why this code does not work, I get an invalid handle, the file does exist.
Steve
You can not open a file from that folder
Check this : https://www.mql5.com/en/docs/files/fileopen (especially this part : "For security reasons, work with files is strictly controlled in the MQL language. Files with which file operations are conducted using MQL means, cannot be outside the file sandbox."
- www.mql5.com
Thanks guys your fantastic :-)
I'm back, Wow MT4 is not easy :-( well not for me anyway :-)
OK can anyone give me the path where I can read a file, I have tried loads of ones I think are right but they don't work :-(
The most recent filepath/name is this
C:\\Users\\scarter\\AppData\\Roaming\\MetaQuotes\\Terminal\\AA248EFC925E5BFD04BE26DB77C272A4\\MQL4\\Files\\values.txt
Steve
scarr: can anyone give me the path where I can read a file,
C:\\Users\\scarter\\AppData\\Roaming\\MetaQuotes\\Terminal\\AA248EFC925E5BFD04BE26DB77C272A4\\MQL4\\Files\\values.txt |
|
I still can't get it to work, this is the line of code. I tried single backslash but that would not compile.
string FileName = "C:\\Users\\scarter\\AppData\\Roaming\\MetaQuotes\\Terminal\\AA248EFC925E5BFD04BE26DB77C272A4\\MQL4\\Files\\report.txt";
I still can't get it to work, this is the line of code. I tried single backslash but that would not compile.
Did you read what whroeder1 wrote?
Specifically, point 2. from his answer?
string FileName = "report.txt";
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can anyone spot why this code does not work, I get an invalid handle, the file does exist.
Steve