Need help with file path

 

I can read and write files OK in one terminal, but they appear to be filed relative to the terminal. I want to be able to read a common file from any terminal/account.

Can anyone show me in the 600 build how to file an absolute path or otherwise access a common file from other terminals/accounts? 

 

I've tried to open this path, which I copied and pasted from the file Properties, but MT won't open it:

   int fileHandle=FileOpen("C:\Program Files\Metatrader\MetaTrader - 082\TESTFOLDER\TESTFILE.txt",FILE_READ|FILE_WRITE|FILE_TXT);

 

 

Thanks! 

 
 I just figured out how to do it. For anyone with the same question, go with the MT path but add "FILE_COMMON" to your file handle flags when you write the file. This places the file in a shared folder making it accessible to other terminals.
 
LouK:  int fileHandle=FileOpen("C:\Program Files\Metatrader\MetaTrader - 082\TESTFOLDER\TESTFILE.txt",FILE_READ|FILE_WRITE|FILE_TXT);
File Read problem - MQL4 forum
 
WHRoeder:
LouK:  int fileHandle=FileOpen("C:\Program Files\Metatrader\MetaTrader - 082\TESTFOLDER\TESTFILE.txt",FILE_READ|FILE_WRITE|FILE_TXT);
File Read problem - MQL4 forum


 But why deal with absolute paths when, as I said above, the FILE_COMMON flag automatically makes the file accessible to other terminals?

 But out of curiosity, I'm not sure what you mean by the file doesn't exist. As I said in the original, I copied and pasted the path from the file Properties. Windows says it exists. Are you saying that MT disagrees? Like some alternative reality?

 
LouK:But out of curiosity, I'm not sure what you mean by the file doesn't exist.
With out the common flag open("xxx/yyy") means open the file "c:\...MQL4\files\xxx\yyy" so open("c:\...\mql4\files\xxx\yy") means open the file "c:\...\mql4\files\c:\...\mql4\files\xxx\yyy" and there is no such file "c:\...\mql4\files\c:\...\mql4\files\xxx\yyy"
Reason: