Demo_FileMove - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources
The script attempts to move a source file from a subdirectory of the terminal's local folder to a target file in a subdirectory of the all-clients shared folder. The names of files and subdirectories are specified in the script input parameters. The following command can be called to obtain the terminal local folder location terminal information string () function.
Printing format ( "Path of terminal local folder: %s\\Files\\" , terminal information string ( terminal data path )); Printing format ( "Path of shared folders of all clients: %s\\Files\\" , terminal information string ( TERMINAL_COMMONDATA_PATH ));
First, the script will use the FileExists () function definition. If the source file exists at the specified path in the terminal's local folder, if not, an error message will appear. Then check whether the target file exists in the specified path. If the target file does not exist, the file rewrite flag is not used. Otherwise, this flag will be used, otherwise the move will not be performed.
Attachment download
📎 demo_filemove.mq5 (2.74 KB)
Source: MQL5 #1614
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •