Please read MetaEditor dictionary
==
If FILE_WRITE does not combine with FILE_READ, a zero-length file will be opened. If even the file containd some data, they will be deleted. If there is a need to add data to an existing file, it must be opened using combination of FILE_READ | FILE_WRITE.
If FILE_READ does not combine with FILE_WRITE, the file will be opened only if it already exists. If the file does not exist, it can be created using the FILE_WRITE mode.
===
==
If FILE_WRITE does not combine with FILE_READ, a zero-length file will be opened. If even the file containd some data, they will be deleted. If there is a need to add data to an existing file, it must be opened using combination of FILE_READ | FILE_WRITE.
If FILE_READ does not combine with FILE_WRITE, the file will be opened only if it already exists. If the file does not exist, it can be created using the FILE_WRITE mode.
===
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
string fileName = Symbol() + "Test.txt";
int x1 = MessageBox(fileName ,"deBug",MB_OK);
int ret = FileOpen(fileName,FILE_CSV|FILE_READ,';');
if (ret < 1)
{
ret = GetLastError();
}
int x2 = MessageBox(DoubleToStr( ret, 2) ,"deBug",MB_OK);
Or GetLastError give me 4103 'Can't open file' or I never get to the second MessageBox.
Can I create a file if there is not one?
Where must/will the file be?
Thanks from a newbie