-
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - Seantjuh1991: This file doesn't get stored in the common folder but here: "C:\\Users\\USERNAME\\AppData\\Roaming\\MetaQuotes\\Terminal\\WEIRDLOOKINGCODE\\MQL4\\Files" <- Added double \\ else the path doesn't work at all...FolderDelete using TERMINAL_DATA_PATH - Technical Analysis - General - MQL5 programming forum 2017.12.13
string src_path=InpSrcDirectory+"\\"+InpSrcName; string dst_path=InpDstDirectory+"\\"+InpDstName;
Please use code buttons to insert code. You can edit your post to fix this. The weird looking code is the id of your MT installation.
Yes I know that about the weird looking code :)
MQL restricts file access to its sandbox only.
string InpDstDirectory="C:\\Users\\USERNAME\\Google Drive\\Charts"; string dst_path=InpDstDirectory+"\\"+InpDstName; if(FileIsExist(dst_path,0)) if(FileMove(src_path,0,dst_path,FILE_COMMON|FILE_REWRITE))
This won't work because it's beyond the sandbox.
MQL restricts file access to its sandbox only.
This won't work because it's beyond the sandbox.
Thought so.... Will look for another solution then... There is always a way!
Either stick with the common folder or create a hardlink to escape the sandbox.
C: cd C:\Users\USERNAME\AppData\Roaming\MetaQuotes\Terminal\Common\Files mklink /D Google "C:\Users\USERNAME\Google Drive\Charts"
string InpDstDirectory="Google"; string dst_path=InpDstDirectory+"\\"+InpDstName; if(FileIsExist(dst_path,0)) if(FileMove(src_path,0,dst_path,FILE_COMMON|FILE_REWRITE))
Either stick with the common folder or create a hardlink to escape the sandbox.
Thanks, I created a task in windows that moves the files every 5 minutes to the correct folder. It works now.
Third party software gets triggered when a new file gets added in that specific folder and fetches the last unread message from my email. And sends the text and screenshot from google drive to Telegram.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
I am new to this programming language. I just can't find out WHY MT4 doesn't find the folder under the FileMove Function... I am missing something here...
The goal is to send an attachment to an email.. However the standard function SendMail doesn't provide that... So I want to upload it to Google Drive so I can use automated software to fetch new files and push them to my Telegram bot( as he does with my email now).
So if there is an easy way to send an attachment like a screenshot in the same email that would be great. For now I am just trying to move the image to my google drive folder...
So first I want to capture a screenshot:
----------------------------------------------------------------
----------------------------------------------------------------
This file doesn't get stored in the common folder but here: "C:\\Users\\USERNAME\\AppData\\Roaming\\MetaQuotes\\Terminal\\WEIRDLOOKINGCODE\\MQL4\\Files" <- Added double \\ else the path doesn't work at all...
So this is how the code looks like:
-----------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------
Please help!