Chris: I was wondering if there was a better way to retrieve the current user
directory?
Why do you care? You can only read/write to the Data Folder and Common directories.
William Roeder:
Why do you care? You can only read/write to the Data Folder and Common directories.
Hi William,Why do you care? You can only read/write to the Data Folder and Common directories.
Chris:
The reason I am trying to find the username directory variable is because I want all my EA's to send screenshots to Google Drive/ Dropbox
I have been successfully writing screenshots to the following directory:
C:\Users\ ~myUSERNAME~ \Google Drive\Screenshots
I
have a sever and two laptops that all have different username directories.
When I load my EA onto a different device I have to manually configure it to have a different ~myUSERNAME~
(otherwise the
screenshot will not save)
For example...
C:\Users\LAPTOP\Google Drive\Screenshots C:\Users\SERVER\Google Drive\Screenshots C:\Users\ADMIN\Google Drive\Screenshots
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
Hello,
I was wondering if there was a better way to retrieve the current user directory?
In Batch file (*.bat) its as simple as placing %USERNAME% in the desired directory path
In MQL4 I was unable to find a similar variable string
My current solution is:
TERMINAL_COMMONDATA_PATH is the only consistent variable I found that contains the USERNAME file directory
StringReplace is used to remove the excess directories (before and after) leaving myUSERNAME string.
The reason I am trying to find the username directory variable is because I want all my EA's to send screenshots to Google Drive/ Dropbox
Kind regards,
Chris