Writing a file to the common folder (script)
Still doesn't seem to work.
string common_data_path=TerminalInfoString(TERMINAL_COMMONDATA_PATH); int FileHandle = FileOpen(common_data_path+"\\thefile.txt",FILE_WRITE|FILE_CSV|FILE_COMMON); FileWrite(FileHandle,TimeCurrent()); FileClose(FileHandle);
nevermind, eventually got it, no need for common_data_path.
Thanks!
Solution in case anyone ever searches this topic with the same problem as me:
int FileHandle = FileOpen("thefile.txt",FILE_WRITE|FILE_CSV|FILE_COMMON); FileWrite(FileHandle,TimeCurrent()); FileClose(FileHandle);
I tried writing to the following common MT4 folder in Windows 8 but it isn't working:
Do I have the right common folder and/or the right name format?
Edit: additional info:
I can write fine to the terminal's folder C:\Users\<name>\AppData\Roaming\MetaQuotes\Terminal\2DDC50D2844ACA35FFD080E7BF7EC474\MQL4\Files by removing the BaseDirectory+ and \\.