Writting script that copies files from one terminal data folder to another

 
Hi,

I have 2 MT5 Terminals in my pc, one for development with a demo account and another for work with real account.

Normally after finishing some adjustments/creation in the dev terminal, I have to copy and paste all .ex5 files to the respectives folders in the real account terminal. That can be pretty boring, so I'ld like to automate that with a script.

I did some attempts with doing so and failed miserably. I tried using FileCopy, but I couldn't make the 'tell from which folter to which folder' function. Then I appealed to a  How to copy file from a tester ffolder to local folder using ShellExecuteA() Function? - Trading Strategy - General - MQL5 programming forum and gosh, I couldn't make it work either :| Neverthless I still wanted a script  that didn't use external dlls, so no big deal, but still a failure.

So how could I copy an ex5. file from local terminal into another terminal folder system? (And is that allowed? I've a vague memory of reading somewhere that there would be some kind of prohibition/blocking for moving files around different terminal's folders, but I'm not sure now). Any help appreciated.
How to copy file from a tester ffolder to local folder using ShellExecuteA() Function?
How to copy file from a tester ffolder to local folder using ShellExecuteA() Function?
  • 2018.07.03
  • www.mql5.com
I have tried a code for copying the generated file from the tester folder to local, but I guess it is not working as I see that the return code is...
 
Martin Bittencourt:
Hi,

I have 2 MT5 Terminals in my pc, one for development with a demo account and another for work with real account.

Normally after finishing some adjustments/creation in the dev terminal, I have to copy and paste all .ex5 files to the respectives folders in the real account terminal. That can be pretty boring, so I'ld like to automate that with a script.

I did some attempts with doing so and failed miserably. I tried using FileCopy, but I couldn't make the 'tell from which folter to which folder' function. Then I appealed to a  How to copy file from a tester ffolder to local folder using ShellExecuteA() Function? - Trading Strategy - General - MQL5 programming forum and gosh, I couldn't make it work either :| Neverthless I still wanted a script  that didn't use external dlls, so no big deal, but still a failure.

So how could I copy an ex5. file from local terminal into another terminal folder system? (And is that allowed? I've a vague memory of reading somewhere that there would be some kind of prohibition/blocking for moving files around different terminal's folders, but I'm not sure now). Any help appreciated.
 
 
Vitaly Muzichenko:
 

Hi,

Thanks for the suggestion, but it didn't work. First because I had to manually copy the ex5 file to the shared projects folder - and that manual process is what I want to avoid! - and second because after copied to there, it didn't appear in the second Terminal navigator, so I couldn't load it.