//+------------------------------------------------------------------+
//| SendFTP.mq5 |
//| Copyright 2024, MetaQuotes Ltd. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2024, MetaQuotes Ltd."
#property link "https://www.mql5.com
#property version "1.00"
#define FILENAME "SomeFile.bin"
#define PATH NULL
//+------------------------------------------------------------------+
//| スクリプトプログラム開始関数 |
//+------------------------------------------------------------------+
void OnStart(void)
{
//--- 端末のFTPアドレスにファイルを送信する権限を確認する
if(!TerminalInfoInteger(TERMINAL_FTP_ENABLED))
{
Print("Error. The client terminal does not have permission to send messages to the FTP-address");
return;
}
//--- ファイルを送信する
ResetLastError();
if(!SendFTP(FILENAME, PATH))
Print("SendFTP() failed. Error ",GetLastError());
}
|