• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 5:23am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 5:23am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Please Help! No Expert Folder in MT4 Folder 12 replies

Where is the Experts and Indicators Folder 10 replies

Need Help with FileMove from Common Folder to Common Folder 3 replies

Reading/writing files in any folder - MT4 build 600+ 0 replies

experts advisor file not in experts folder 12 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 1
Attachments: copy and move experts/files to another folder
Exit Attachments

copy and move experts/files to another folder

  • Post #1
  • Quote
  • First Post: Jun 26, 2012 2:39pm Jun 26, 2012 2:39pm
  •  pipmyride
  • | Joined Jan 2009 | Status: Member | 1,067 Posts
I'd like to be able to copy a gif file from the /experts/files folder to an external folder in windows, within an EA - has anyone got something that does this.

thx
  • Post #2
  • Quote
  • Jun 26, 2012 7:44pm Jun 26, 2012 7:44pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,081 Posts
Quoting pipmyride
Disliked
I'd like to be able to copy a gif file from the /experts/files folder to an external folder in windows, within an EA - has anyone got something that does this.

thx
Ignored
Pipmyride,

You could possibly use the ShellExecute command to call Windows' cmd.exe and execute a copy. I've never attempted anything like this, so I'm afraid you're on your own.

Alternatively, you could use WatchAndCopy (download from post #1) of this Steve Hopwood thread (more info here). W&C runs in the background and will copy any new or changed files of the name(s) you specify from one nominated folder into another. I can't see any reason why it shouldn't work with GIF files.

David
  • Post #3
  • Quote
  • Jun 26, 2012 9:44pm Jun 26, 2012 9:44pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,081 Posts
Quoting hanover
Disliked
You could possibly use the ShellExecute command to call Windows' cmd.exe and execute a copy. I've never attempted anything like this, so I'm afraid you're on your own.
Ignored
FWIW, I got the following code to work OK on WinXP. I can't try it on Vista or Win7.

Here's the MQL4 code needed (replace 'MT4 Pepperstone' with your own MT4 folder) :

Inserted Code
#import "shell32.dll"
  int ShellExecuteA(int hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd);
#import

 ...  ... ... ... ... ... ...  ... ... ... ... ... ...  ... ... ... ... ... ...

  string FilesFolder = "c:\MT4 Pepperstone\experts";
  ShellExecuteA(NULL, "open", FilesFolder+"execute.bat", "", FilesFolder, 3);
Then use Notepad to create a batch file execute.bat with your copy command, followed by an exit, and place it in your ...../(MT4)/experts folder:
Inserted Code
copy *.gif c:\destination_folder
exit
The above command should copy all .GIF files in the .../(MT4)/experts folder to the destination_folder. Change it, if necessary, to suit.

David
  • Post #4
  • Quote
  • Jun 27, 2012 1:24am Jun 27, 2012 1:24am
  •  pipmyride
  • | Joined Jan 2009 | Status: Member | 1,067 Posts
u da man hanover , thx very much will try both options shortly
  • Post #5
  • Quote
  • Jun 27, 2012 5:55am Jun 27, 2012 5:55am
  •  pipmyride
  • | Joined Jan 2009 | Status: Member | 1,067 Posts
i've gone the route of using ShellExecute and its working a charm,
  • Post #6
  • Quote
  • Jun 27, 2012 6:28am Jun 27, 2012 6:28am
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,081 Posts
Quoting pipmyride
Disliked
i've gone the route of using ShellExecute and its working a charm,
Ignored
Excellent! I stepped out of my comfort zone, hadn't used ShellExecute before. Very pleasing that it worked.
  • Post #7
  • Quote
  • Last Post: Jun 27, 2012 2:01pm Jun 27, 2012 2:01pm
  •  CockeyedCowboy
  • | Joined Apr 2006 | Status: Trader Keit | 286 Posts
PMR

you can work with files anywere on your hard drive, see attached picture, this dill file is part of windows. I used it to access and change some MT files that were outside the expert>files driectory. If you want the code, PM me and I will email it to you.

This code has a few other things that some one like you may be interested in. like how to program key strokes and how to change the currency symbol and or time scale of your charts from with in your program. That is. it will rotate all the symbols in your portfolio (file) so you can keep an eye on the market from one window.

Keit


edit [forgot the picture]





Quoting pipmyride
Disliked
I'd like to be able to copy a gif file from the /experts/files folder to an external folder in windows, within an EA - has anyone got something that does this.

thx
Ignored
Attached Image (click to enlarge)
Click to Enlarge

Name: file functions.jpg
Size: 81 KB
Trader Keit ... Methods Of A Dirt Road Mad Man....
  • Platform Tech
  • /
  • copy and move experts/files to another folder
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2021