> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FTP Connector

> Configuration and usage guide for the CData Arc FTP connector, which transfers files to and from a remote FTP server.

export const CommonCacheCleanup = () => <>
    <p>Arc はリソースキャッシュを自動的にクリーンアップします。この処理はすべての受信サイクルの間にバックグラウンドで実行され、リモートサーバー上にすでに存在しないファイルの古いキャッシュエントリを削除します。これにより、手動での操作を必要とせずにキャッシュサイズを管理可能な状態に保ちます。</p>
    <p>デフォルトでは、ファイルは30 日間保持されますが、<strong>Advanced</strong> タブの<strong>Other Settings</strong> フィールドにある<code>ResourceCacheRetentionDays</code> 設定を使用して、お使いの環境に合わせて調整できます。例えば、<code>ResourceCacheRetentionDays=15</code> とすると、ファイルは削除されるまで15 日間保持されます。</p>
  </>;

export const CommonServerCommands = ({extraCommands}) => <>
    <p>これらのオプションを使用すると、コネクタの実行中のさまざまなタイミングで、ターゲットサーバー上でカスタムコマンドを実行できます。</p>

    <Note>以下で説明するコマンドは一般的に受け入れられますが、コマンドを使用する前に、ターゲットサーバーがそのコマンドを受け入れられることをサーバー管理者に必ず確認してください。</Note>

    <table>
      <thead>
        <tr><th>設定</th><th>説明</th></tr>
      </thead>
      <tbody>
        <tr><td><strong>After Connect</strong></td><td>接続した直後にこのコマンドを実行します。</td></tr>
        <tr><td><strong>After Get</strong></td><td>各ファイルをダウンロードした後にこのコマンドを実行します。</td></tr>
        <tr><td><strong>After Put</strong></td><td>各ファイルをアップロードした後にこのコマンドを実行します。</td></tr>
        <tr><td><strong>Before Get</strong></td><td>各ファイルをダウンロードする前にこのコマンドを実行します。</td></tr>
        <tr><td><strong>Before Put</strong></td><td>各ファイルをアップロードする前にこのコマンドを実行します。</td></tr>
      </tbody>
    </table>

    <p>上記で説明したフィールドに含めることで、ターゲットサーバーに送信できるコマンドは次のとおりです。</p>

    <p style={{
  paddingLeft: '1.5rem',
  marginTop: '0.25rem',
  marginBottom: '0.25rem'
}}>• <code>onerror</code>：<code>fail</code> 引数を渡すと、カスタムスクリプトから発生したエラーをトランザクション全体のエラーとして扱うようコネクタに指示します。<code>fail</code> がない場合、コネクタは例外をログに記録して処理を続行します。</p>
    <p style={{
  paddingLeft: '1.5rem',
  marginTop: '0.25rem',
  marginBottom: '0.25rem'
}}>• <code>cd</code>：ディレクトリを変更します。</p>
    <p style={{
  paddingLeft: '1.5rem',
  marginTop: '0.25rem',
  marginBottom: '0.25rem'
}}>• <code>mkdir</code>：ディレクトリを作成します。</p>
    <p style={{
  paddingLeft: '1.5rem',
  marginTop: '0.25rem',
  marginBottom: '0.25rem'
}}>• <code>rn</code> または <code>move</code>：ファイルの名前を変更または移動します。</p>
    <p style={{
  paddingLeft: '1.5rem',
  marginTop: '0.25rem',
  marginBottom: '0.25rem'
}}>• <code>del</code> または <code>rm</code>：ファイルを削除または除去します。</p>
    <p style={{
  paddingLeft: '1.5rem',
  marginTop: '0.25rem',
  marginBottom: '0.25rem'
}}>• <code>rmdir</code>：ディレクトリを削除します。</p>
    {extraCommands}

    <p>CData Arc は、これらのコマンドで次のマクロをサポートしています。これらはすべて次の構文を使用します。<code>%Macro%</code>。<code>%Date%</code> や <code>%SourceFilename%</code> などの一部のマクロは引数を必要としませんが、引数を必要とするものもあります。引数を取るマクロは次の構文を使用します。<code>%Macro:argument%</code></p>

    <table>
      <thead>
        <tr><th>マクロ</th><th>説明</th></tr>
      </thead>
      <tbody>
        <tr><td>MsgHeader:<em>headername</em></td><td>メッセージのヘッダー値に評価されます（例：%MsgHeader:headername%）。</td></tr>
        <tr><td>SourceFilename</td><td>現在処理されているファイルのファイル名（拡張子を含む）に評価されます。</td></tr>
        <tr><td>SourceFilenameNoExt</td><td>現在処理されているファイルのファイル名（拡張子を除く）に評価されます。</td></tr>
        <tr><td>Date</td><td>ファイルが最後に更新された日付をyyyy-MM-dd 形式（例：2024-02-13）で評価します。</td></tr>
        <tr><td>DateTime</td><td>ファイルが最後に更新された日時をyyyy-MM-dd'T'HH:mm:ss 形式（例：2024-02-13T08:14:22）で評価します。</td></tr>
        <tr><td>Time</td><td>ファイルが最後に更新された時刻をHH:mm:ss 形式（例：08:14:22）で評価します。</td></tr>
        <tr><td>DateTime.tz</td><td>ファイルが最後に更新された日時をyyyy-MM-dd'T'HH:mm:ss zzz 形式（例：2024-02-13T08:14:22 PST）で評価します。</td></tr>
        <tr><td>Time.tz</td><td>ファイルが最後に更新された時刻をHH:mm:ss zzz 形式（例：08:14:22 PST）で評価します。</td></tr>
        <tr><td>DateFormat:<em>format</em></td><td>システムの現在の日時を指定された形式（<code>format</code>）で評価します。利用可能な日時形式については、<a href="/26.3/cloud/ja/scripting/value-formatters/date-formatters#date-formats-with-literal-characters">日付形式のサンプル</a>を参照してください。</td></tr>
      </tbody>
    </table>

    <p><strong>例</strong>：ダウンロード後に、各ファイルをダウンロードフォルダからHistory サブフォルダに移動したいとします。<strong>After Get</strong> フィールドを使用して、<code>%SourceFilename%</code> マクロとともに<code>move</code> コマンドを指定します。</p>

    <img src="/public/images/server_command_example.png" alt="Server command example" width="500" />
  </>;

export const CommonProxySettings = () => <>
    <p>これらは、接続のルーティング先となるプロキシを識別し認証するための一連の設定です。デフォルトでは、このセクションは<a href="/26.3/cloud/ja/getting-started/administration/settings/security">Security Settings</a> ページの<a href="/26.3/cloud/ja/getting-started/administration/settings/proxy-settings">Proxy Settings</a> 部分にあるグローバル設定を使用します。チェックボックスをオフにすると、コネクタ固有の設定を指定できます。</p>
    <table>
      <thead>
        <tr><th>設定</th><th>説明</th></tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Proxy Type</strong></td>
          <td>プロキシベースのファイアウォールで使用されるプロトコル。</td>
        </tr>
        <tr>
          <td><strong>Proxy Host</strong></td>
          <td>プロキシベースのファイアウォールの名前またはIP アドレス。</td>
        </tr>
        <tr>
          <td><strong>Proxy Port</strong></td>
          <td>プロキシベースのファイアウォールのTCP ポート。</td>
        </tr>
        <tr>
          <td><strong>Proxy User</strong></td>
          <td>プロキシベースのファイアウォールで認証するために使用するユーザー名。</td>
        </tr>
        <tr>
          <td><strong>Proxy Password</strong></td>
          <td>プロキシベースのファイアウォールで認証するために使用するパスワード。</td>
        </tr>
        <tr>
          <td><strong>Authentication Scheme</strong></td>
          <td>デフォルトの<strong>None</strong> のままにするか、次の認証スキームのいずれかを選択します：<strong>Basic</strong>、<strong>Digest</strong>、<strong>Proprietary</strong>、または<strong>NTLM</strong>。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const SlasTab = ({siteName = "CData Arc"}) => <>
    <p><em>サービスレベルアグリーメント（SLA）の設定に関する設定です。</em></p>
    <p>
      SLA を使用すると、フロー内のコネクタが送受信すると見込まれるボリュームを設定し、そのボリュームを達成すると見込まれる期間を設定できます。{siteName} は、SLA が達成されない場合にユーザーへ警告するメールを送信し、SLA を<em>At Risk</em> としてマークします。これは、SLA が間もなく達成されない場合に<em>Violated</em> としてマークされることを意味します。これにより、ユーザーは介入してSLA が達成されない理由を特定し、適切な対応を取る機会を得られます。At Risk 期間の終了時点でもSLA が達成されない場合、SLA はviolated としてマークされ、ユーザーに再度通知されます。
    </p>
    <p>
      SLA を定義するには、<strong>Expected Volume</strong> をオンに切り替え、<strong>Settings</strong> タブをクリックします。
    </p>
    <img src="/public/images/sla_empty.png" alt="SLA Empty" />
    <ul>
      <li>コネクタに送信と受信の個別のアクションがある場合は、ラジオボタンを使用してSLA がどちらの方向に適用されるかを指定します。</li>
      <li>ウィンドウの<strong>Expect at least</strong> 部分で、次を設定します。
        <ul>
          <li>処理を見込む最小トランザクション数（ボリューム）を設定します。</li>
          <li><strong>Every</strong> フィールドを使用して期間を指定します。</li>
          <li>SLA を有効にするタイミングを指定します。<strong>Starting on</strong> を選択した場合は、日付および時刻フィールドを入力します。</li>
          <li>SLA を有効にしたい曜日のチェックボックスをオンにします。必要に応じて、ドロップダウンで<strong>Everyday</strong> を選択します。</li>
        </ul>
      </li>
      <li>ウィンドウの<strong>Set status to 'At Risk'</strong> 部分で、SLA をAt Risk としてマークするタイミングを指定します。
        <ul>
          <li>デフォルトでは、SLA が違反状態になるまで通知は送信されません。これを変更するには、<strong>Send an 'At Risk' notification</strong> をオンにします。</li>
        </ul>
      </li>
    </ul>
    <p>
      次の例は、月曜日から金曜日まで毎日1000 件のファイルを受信すると見込むコネクタ向けに設定されたSLA を示しています。1000 件のファイルが受信されていない場合、期間の終了の1時間前にAt Risk 通知が送信されます。
    </p>
    <img src="/public/images/sla_defined.png" alt="SLA Configuration Example" />
    <Note>
      必要に応じてSLA アラートをオフにすることができます。これはメンテナンスウィンドウ中に役立ちます。navbar で<strong>Settings</strong> をクリックし、<strong>Alerts &gt; General Alerts</strong> に移動します。タブレットと鉛筆のアイコンをクリックして編集し、<strong>SLA Alerts</strong> 設定のチェックを外します。
    </Note>
  </>;

export const AlertsTab = ({siteNameShort = "Arc"}) => <>
    <p><em>アラートの設定に関する設定です。</em></p>
    <p>
      サービスレベルアグリーメント（SLA）を実行する前に、通知用のメールアラートをセットアップする必要があります。デフォルトでは、{siteNameShort} は<a href="/26.3/cloud/ja/getting-started/administration/settings/alerts">Alerts</a> タブのグローバル設定を使用します。このコネクタに別の設定を使用するには、<strong>Override global setting</strong> をオンに切り替えます。
    </p>
    <p>
      デフォルトではエラーアラートが有効になっており、エラーが発生するたびにメールが送信されます。これをオフにするには、<strong>Enable</strong> チェックボックスのチェックを外します。
    </p>
    <p>
      <strong>Subject</strong>（必須）を入力します。<strong>Allow {siteNameShort}Script in Subject</strong> をチェックすると、<strong>Subject</strong> フィールドで{siteNameShort}Script を使用できます。これを選択すると、<strong>{siteNameShort}Script エディタ</strong>ボタンが表示されます（<img src="/public/images/rest_arcscript_editor.png" alt="arcscript editor button" style={{
  display: 'inline',
  verticalAlign: 'middle',
  margin: 0
}} />）。
    </p>
    <p>
      必要に応じて<strong>Recipient</strong> のメールアドレスをカンマ区切りのリストで入力します。
    </p>
  </>;

export const MiscConnector = () => <>
    <p><em>Miscellaneous 設定は、特定のユースケース向けの設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Other Settings</strong></td>
          <td>非表示のコネクタ設定をセミコロン区切りのリストで設定できます（例：<code>setting1=value1;setting2=value2</code>）。通常のコネクタのユースケースや機能では、これらの設定の使用は必要ありません。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const Logging = () => <>
    <p><em>ログの作成と保存を制御する設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Log Level</strong></td>
          <td>コネクタが生成するログの詳細度です。サポートを依頼する際は、これを<strong>Debug</strong> に設定してください。</td>
        </tr>
        <tr>
          <td><strong>Log Subfolder Scheme</strong></td>
          <td>選択した間隔に従って、コネクタがLogs フォルダ内のファイルをグループ化するよう指示します。<strong>Weekly</strong> オプション（デフォルト）は、コネクタが毎週新しいサブフォルダを作成し、その週のすべてのログをそのフォルダに保存するよう指示します。この設定を空白のままにすると、コネクタはすべてのログをLogs フォルダに直接保存します。多数のトランザクションを処理するコネクタでは、サブフォルダを使用することでログを整理しやすくなり、パフォーマンスが向上します。</td>
        </tr>
        <tr>
          <td><strong>Log Messages</strong></td>
          <td>処理したファイルのログエントリにファイル自体のコピーを含めるには、これをオンにします。これを無効にすると、<strong>Transactions</strong> タブからファイルのコピーをダウンロードできなくなる場合があります。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const MacrosExamples = ({extraMacros = []}) => <>
    <p>
      %Ext% や %ShortDate% などの一部のマクロは引数を必要としませんが、引数を必要とするものもあります。
      引数を取るすべてのマクロは次の構文を使用します。<code>%Macro:argument%</code>
    </p>

    <p>引数を取るマクロの例を次に示します。</p>

    <ul>
      <li>%Header:headername%：<code>headername</code> はメッセージ上のヘッダーの名前です。</li>
      <li>%Header:mycustomheader% は、入力メッセージに設定された<code>mycustomheader</code> ヘッダーの値に解決されます。</li>
      <li>%Header:ponum% は、入力メッセージに設定された<code>ponum</code> ヘッダーの値に解決されます。</li>
      <li>%RegexFilename:pattern%：<code>pattern</code> は正規表現パターンです。例えば、<code>%RegexFilename:^([\w][A-Za-z]+)%</code> は、ファイル名の最初の単語にマッチしてそれに解決され、大文字・小文字を区別しません（<code>test_file.xml</code> は<code>test</code> に解決されます）。</li>
      <li>%Vault:vaultitem%：<code>vaultitem</code> は<a href="/26.3/cloud/ja/getting-started/administration/settings/global-settings-vault">Vault</a> 内のアイテムの名前です。例えば、<code>%Vault:companyname%</code> は、Vault に保存された<code>companyname</code> アイテムの値に解決されます。</li>
      <li>%DateFormat:format%：<code>format</code> は許容される日付形式です（詳細は<a href="/26.3/cloud/ja/scripting/value-formatters/date-formatters#sample-date-formats">日付形式のサンプル</a>を参照してください）。例えば、<code>%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%</code> は、ファイルの日付とタイムスタンプに解決されます。</li>
      {extraMacros.filter(item => item.example).map(item => <li key={`ex-${item.name}`}>{item.example}</li>)}
    </ul>

    <p>次の例に示すように、より高度なマクロを作成することもできます。</p>

    <ul>
      <li>1 つのファイル名で複数のマクロを組み合わせる：<code>%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%%EXT%</code></li>
      <li>マクロの外側にテキストを含める：<code>MyFile_%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%</code></li>
      <li>マクロの内側にテキストを含める：<code>%DateFormat:'DateProcessed-'yyyy-MM-dd_'TimeProcessed-'HH-mm-ss%</code></li>
    </ul>
  </>;

export const MacrosTable = ({siteName = "CData Arc", extraMacros = []}) => <>
    <p>
      ファイル命名戦略でマクロを使用すると、データの整理効率と文脈の理解を高めることができます。
      ファイル名にマクロを組み込むことで、識別子、タイムスタンプ、ヘッダー情報などの関連情報を
      動的に含めることができ、各ファイルに有用な文脈を提供します。
    </p>

    <p>{siteName} は次のマクロをサポートしています。これらはすべて次の構文を使用します。<code>%Macro%</code></p>

    <table>
      <thead>
        <tr><th>マクロ</th><th>説明</th></tr>
      </thead>
      <tbody>
        <tr><td>ConnectorID</td><td>コネクタのConnectorID に評価されます。</td></tr>
        <tr><td>ConnectorName</td><td>コネクタの名前に評価されます。ファイル名やパスに接続名を含めることができます。例えば、どのデータベース接続が生成したかによってバックアップファイルにタグを付けるために使用できます。</td></tr>
        <tr><td>Ext</td><td>コネクタが現在処理しているファイルの拡張子に評価されます。</td></tr>
        <tr><td>Filename</td><td>コネクタが現在処理しているファイルのファイル名（拡張子を含む）に評価されます。</td></tr>
        <tr><td>FilenameNoExt</td><td>コネクタが現在処理しているファイルのファイル名（拡張子を除く）に評価されます。</td></tr>
        <tr><td>MessageId</td><td>コネクタが出力しているメッセージのMessageId に評価されます。</td></tr>
        <tr><td>RegexFilename:<em>pattern</em></td><td>コネクタが現在処理しているファイルのファイル名に正規表現パターンを適用します。</td></tr>
        <tr><td>Header:<em>headername</em></td><td>コネクタが現在処理しているメッセージ上の対象ヘッダー（<code>headername</code>）の値に評価されます。</td></tr>
        <tr><td>LongDate</td><td>システムの現在の日時を長い形式（例：Wednesday, January 24, 2024）で評価します。</td></tr>
        <tr><td>ShortDate</td><td>システムの現在の日時をyyyy-MM-dd 形式（例：2024-01-24）で評価します。</td></tr>
        <tr><td>DateFormat:<em>format</em></td><td>システムの現在の日時を指定された形式（<code>format</code>）で評価します。利用可能な日時形式については、<a href="/26.3/cloud/ja/scripting/value-formatters/date-formatters#date-formats-with-literal-characters">日付形式のサンプル</a>を参照してください。</td></tr>
        <tr><td>Vault:<em>vaultitem</em></td><td>指定されたVault アイテムの値に評価されます。</td></tr>
        {extraMacros.map(item => <tr key={item.name}>
            <td>{item.name}</td>
            <td>{item.description}</td>
          </tr>)}
      </tbody>
    </table>
  </>;

export const Performance = () => <>
    <p><em>コネクタへのリソースの割り当てに関する設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Max Workers</strong></td>
          <td>このコネクタでファイルを処理するためにスレッドプールから消費されるワーカースレッドの最大数です。設定すると、<a href="/26.3/cloud/ja/getting-started/administration/settings/advanced-settings">Advanced Settings</a> ページの<a href="/26.3/cloud/ja/getting-started/administration/settings/performance-settings">Performance Settings</a> 部分にあるデフォルト設定が上書きされます。</td>
        </tr>
        <tr>
          <td><strong>Max Files</strong></td>
          <td>コネクタに割り当てられた各スレッドが送信するファイルの最大数です。設定すると、<a href="/26.3/cloud/ja/getting-started/administration/settings/advanced-settings">Advanced Settings</a> ページの<a href="/26.3/cloud/ja/getting-started/administration/settings/performance-settings">Performance Settings</a> 部分にあるデフォルト設定が上書きされます。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const siteNameShort = "Arc";

export const siteName = "CData Arc";

export const ftpServerCommandExtras = <p style={{
  paddingLeft: '1.5rem',
  marginTop: '0.25rem',
  marginBottom: '0.25rem'
}}>• <code>quote</code>: Sends a command directly to the server as-is.</p>;

The FTP Connector transfers files to and from a remote FTP server.

## Key Capabilities

* File transfer protocol support with FTPS (FTP over TLS/SSL) and traditional FTP
* Active and passive mode support with comprehensive firewall compatibility
* Resume capability for interrupted uploads and downloads
* Advanced authentication including certificate-based client authentication
* Connection pooling and temporary file handling for reliable transfers
* Optional caching to ensure only new or updated files are downloaded

## Overview

Each FTP Connector connects uploads to a specified folder and downloads from a set of folders on the remote FTP server.

Files that reach the FTP Connector in the {siteNameShort} flow are uploaded to the upload target folder, and files found in the download target folder(s) are downloaded and entered into the {siteNameShort} flow. The connector supports upload and download filters to only send and receive specified file names and/or file extensions.

## Connector Configuration

This section contains all of the configurable connector properties.

### Settings Tab

#### Host Configuration

*Settings related to establishing the connection to the remote FTP host.*

| Setting                   | Description                                                                                                                                                                                                                                                                 |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Connector Id**          | The static, unique identifier for the connector.                                                                                                                                                                                                                            |
| **Connector Type**        | Displays the connector name and a description of what it does.                                                                                                                                                                                                              |
| **Connector Description** | An optional field to provide a free-form description of the connector and its role in the flow.                                                                                                                                                                             |
| **Remote Host**           | The hostname or IP address of the FTP server.                                                                                                                                                                                                                               |
| **TLS Type**              | How to negotiate TLS/SSL when connecting to the server. Choose **Explicit** to establish a plain text connection where TLS/SSL is then started with an explicit command. Choose **Implicit** to immediately negotiate TLS/SSL without establishing a plain text connection. |
| **Remote Port**           | The port on which to connect to the FTP server.                                                                                                                                                                                                                             |

#### Client Authentication

*Settings related to authenticating to the FTP server.*

| Setting       | Description                                    |
| ------------- | ---------------------------------------------- |
| **User Name** | The username for logging in to the FTP server. |
| **Password**  | The password for logging in to the FTP server. |

#### Server Authentication

*Setting related to verifying the FTP server's identity.*

| Setting                       | Description                                                                                                                                                                                                                                                                                                                                                                                             |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Server Public Certificate** | The public key certificate used to verify the identity of a TLS/SSL server. If the target server uses TLS/SSL, set this field to the certificate that identifies the server. If the server's certificate is not available, you can leave this setting blank to allow the underlying OS/JVM to perform certificate validation, or set it to `Any Certificate` to implicitly trust the server's identity. |

#### Upload

*Setting related to uploading files to the FTP server.*

| Setting         | Description                                                                                                                                                                                                                     |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Remote Path** | Files processed by the connector are uploaded to the specified remote folder. You can use macros to dynamically create dated folders (such as year or month folders) in your path. For more information, see [Macros](#macros). |

#### Download

*Settings related to downloading from the FTP server.*

| Setting                           | Description                                                                                                                                                                                                                                                |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Remote Path**                   | The remote folder from which files are downloaded. Use a comma-delimited list to specify multiple paths. You can use macros to dynamically create dated folders (such as year or month folders) in your path. For more information, see [Macros](#macros). |
| **File Mask**                     | A glob pattern that determines which files within the **Remote Path** should be downloaded (for example, \*.txt).                                                                                                                                          |
| **Delete files (after received)** | Check this to delete successfully downloaded files from the FTP server.                                                                                                                                                                                    |

#### Caching

*Settings related to caching and comparing files between multiple downloads.*

| Setting                  | Description                                                                                                                                                                          |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **File Size Comparison** | Check this to keep a record of downloaded file names and sizes. Previously downloaded files are skipped unless the file size is different than the last download.                    |
| **Timestamp Comparison** | Check this to keep a record of downloaded file names and last-modified timestamps. Previously downloaded files are skipped unless the timestamp is different than the last download. |

<Note><CommonCacheCleanup /> When you enable caching, the file names are case-insensitive. For example, the connector cannot distinguish between `TEST.TXT` and `test.txt`.</Note>

### Advanced Tab

#### TLS Client Authentication

*Settings related to client authentication when two-way TLS authentication is required.*

| Setting                         | Description                                                         |
| ------------------------------- | ------------------------------------------------------------------- |
| **Client Certificate**          | The private certificate presented during TLS client authentication. |
| **Client Certificate Password** | The password required to access the TLS client certificate.         |

#### Server Commands

<CommonServerCommands extraCommands={ftpServerCommandExtras} />

#### Advanced Settings

*Settings not included in the previous categories.*

| Setting                             | Description                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Account**                         | The Windows user account whose credentials should be presented to the FTP server.                                                                                                                                                                                                                                                                                                                                |
| **Active Mode**                     | Check this to enable Active mode on the remote FTP server. Keep in mind that Passive mode is less likely to result in firewall interference with the connection.                                                                                                                                                                                                                                                 |
| **Clear Command Channel**           | Check this to send FTP commands using a cleartext channel instead of an encrypted channel.                                                                                                                                                                                                                                                                                                                       |
| **Clear Data Channel**              | Check this to have the application use a clear data channel when communicating with the FTP server.                                                                                                                                                                                                                                                                                                              |
| **Use Connection Pooling**          | Check this to have the connector utilize a pool to access and store connections. This is useful in scenarios where the server places restrictions on the frequency of logon attempts.                                                                                                                                                                                                                            |
| **Download Excluded Extensions**    | A comma-delimited list of file extensions that should not be downloaded by the connector.                                                                                                                                                                                                                                                                                                                        |
| **Download Excluded Prefixes**      | A comma-delimited list of prefixes that should not be downloaded. The connector skips filenames that begin with these prefixes.                                                                                                                                                                                                                                                                                  |
| **EPSV**                            | Check this to use extended passive mode. This might be necessary if you need to use a protocol other than IPv4.                                                                                                                                                                                                                                                                                                  |
| **FSwitch**                         | Used in conjunction with **Simple Dir List**. Check this to restrict the directory listing to files only.                                                                                                                                                                                                                                                                                                        |
| **Max Download Files**              | The maximum number of files to be downloaded from the SFTP server in one polling interval. Set to **-1** to allow all files to be downloaded.                                                                                                                                                                                                                                                                    |
| **Minimum File Size**               | The minimum file size to process, in bytes. If a file being uploaded is smaller than the specified size, it is finalized as **Skipped**. For files being downloaded, the connector adds a transaction log entry indicating that the file was skipped because of its size.                                                                                                                                        |
| **Maximum File Size**               | The maximum file size to process, in bytes. If a file being uploaded is larger than the specified size, it is finalized as **Skipped**. For files being downloaded, the connector adds a transaction log entry indicating that the file was skipped because of its size.                                                                                                                                         |
| **Monitor File Growth**             | Check this to have the application store the file sizes of the remote files between polling intervals, and only download files that do not change in size. This prevents the connector from downloading files that are still in the process of being written on the server.                                                                                                                                      |
| **Passive Connection Address**      | Only used when **Active Mode** is not checked. If unchecked, the application parses the remote host to send replies from the previous server response. If you check this, the application uses the value of the **Remote Host** setting.                                                                                                                                                                         |
| **Prot for Implicit TLS**           | Tells the server that the data channel is protected for implicit TLS connections. Select the TLS type on the **Settings** tab.                                                                                                                                                                                                                                                                                   |
| **Recurse**                         | Check this to download files in subfolders of the target remote path. The subdirectories are preserved for the received files.                                                                                                                                                                                                                                                                                   |
| **Resume Downloads**                | If enabled, when an error occurs during a file download, the connector stores the portion of the file that was downloaded and attempts to download the remainder of the file on the next download attempt.                                                                                                                                                                                                       |
| **Resume Uploads**                  | If enabled, when an error occurs during a file upload, the connector notes the number of bytes that were transferred and attempts to upload the remainder of the file on the next upload attempt.                                                                                                                                                                                                                |
| **Simple Dir List**                 | Check this when you need a simple directory listing command for servers that send back long responses that cannot be parsed. After you set this, if the connector is still unable to parse the directory listing, add the **FSwitch** setting to restrict the directory listing to files only.                                                                                                                   |
| **TLS Enabled Protocols**           | The list of TLS/SSL protocols supported when establishing outgoing connections. Best practice is to only use TLS protocols. Keep in mind that SSLv2 and SSLv3 are considered vulnerable and should only be used if your partner does not support higher versions. Keep in mind that TLS v1.3 is not universally adopted, and might be refused if the destination server does not support them.                   |
| **Temp Download Extension**         | A temporary file extension to append to file downloads while the transfer is in progress.                                                                                                                                                                                                                                                                                                                        |
| **Temp Upload Extension**           | A temporary file extension to append to file uploads while the transfer is in progress.                                                                                                                                                                                                                                                                                                                          |
| **Temp Upload Path**                | A temporary path on the remote FTP server where files are uploaded. The file is moved into the permanent upload path after the transfer is complete.                                                                                                                                                                                                                                                             |
| **Temp Upload Prefix**              | A temporary file prefix to prepend to file uploads while the transfer is in progress.                                                                                                                                                                                                                                                                                                                            |
| **Timeout**                         | The duration the connector waits for a connection response before throwing a timeout error.                                                                                                                                                                                                                                                                                                                      |
| **Transfer Mode**                   | Whether files should be transferred as ASCII or binary. If set to **Default**, the server chooses the transfer mode.                                                                                                                                                                                                                                                                                             |
| **Upload Single Transaction**       | Check this to upload all files in a single transaction. By default (unchecked), the application logs off from the server after each upload.                                                                                                                                                                                                                                                                      |
| **Local File Scheme**               | A scheme for assigning filenames to messages that are output by the connector. You can use macros in your filenames dynamically to include information such as identifiers and timestamps. For more information, see [Macros](#macros).                                                                                                                                                                          |
| **Receive Filter**                  | A glob pattern filter to determine which files should be downloaded from the remote storage (for example, \*.txt). You can use negative patterns to indicate files that should *not* be downloaded (for example, -\*.tmp). Use this setting when you need multiple **File Mask** patterns. Multiple patterns can be separated by commas, with later filters taking priority except when an exact match is found. |
| **Use MLSD for directory listings** | Check this to use the MLSD command to return detailed directory listings. This might not be supported on legacy FTP servers, which might return an error such as *Command not understood*. Uncheck this to address that error on legacy servers.                                                                                                                                                                 |
| **Processing Delay**                | The amount of time (in seconds) by which the processing of files placed in the **Transactions** tab is delayed. This is a legacy setting. Best practice is to [use a File connector](../flows/designing-a-flow#ローカルファイルシステムとのやり取り) to manage local file systems instead of this setting.                                                                                                                         |

#### Proxy Settings

<CommonProxySettings />

#### Logging

<Logging />

#### Miscellaneous

<MiscConnector />

### Automation Tab

#### Automation Settings

*Settings related to the automatic processing of files by the connector.*

| Setting                   | Description                                                                                                                                                                                                       |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Upload**                | Whether files arriving at the connector should automatically be uploaded.                                                                                                                                         |
| **Retry Interval**        | The number of minutes before a failed upload is retried.                                                                                                                                                          |
| **Max Attempts**          | The maximum number of times the connector processes the input file. Success is measured based on a successful server acknowledgement. If you set this to 0, the connect retries the file indefinitely.            |
| **Download**              | Whether the connector should automatically poll the remote download path(s) for files to download.                                                                                                                |
| **Interval**              | The interval between automatic download attempts.                                                                                                                                                                 |
| **Minutes Past the Hour** | The minutes offset for an hourly schedule. Only applicable when the interval setting above is set to *Hourly*. For example, if this value is set to 5, the automation service downloads at 1:05, 2:05, 3:05, etc. |
| **Time**                  | The time of day that the attempt should occur. Only applicable when the interval setting above is set to *Daily*, *Weekly*, or *Monthly*.                                                                         |
| **Day**                   | The day on which the attempt should occur. Only applicable when the interval setting above is set to *Weekly* or *Monthly*.                                                                                       |
| **Minutes**               | The number of minutes to wait before attempting the download. Only applicable when the interval setting above is set to *Minute*.                                                                                 |
| **Cron Expression**       | A five-position string representing a cron expression that determines when the attempt should occur. Only applicable when the interval setting above is set to *Advanced*.                                        |

#### Performance

<Performance />

### Alerts Tab

<AlertsTab />

### SLAs Tab

<SlasTab />

## Establishing a Connection

Connecting to the remote FTP server requires the following settings:

* Remote Host
* TLS Type
* Remote Port
* User Name
* Password

FTP servers might also require **Server Public Certificate** (on the **Settings** tab) and/or [TLS Client Authentication](#tls-client-authentication) (on the **Advanced** tab).

## Uploading Files

The FTP Connector uploads files from the **Transactions** tab. Files are automatically uploaded to the FTP server if **Upload Automation** is enabled in the connector.

**Remote Path** should be set to the folder on the remote FTP server where files should be uploaded. You can use [macros](#macros) to dynamically create dated folders (such as year or month folders). The application changes directories to the specified folder after logging in to the server. You can set a temporary upload extension, prefix, or path on the **Advanced** tab to ensure that files have been fully transferred before they end up in the **Remote Path** folder.

If any files could not be uploaded, the connector attempts to send them again after the **Retry Interval** minutes have elapsed. This process continues until the **Max Attempts** setting is reached, after which the connector raises an error and the file is no longer sent automatically.

## Downloading Files

Downloaded files are displayed in the **Transactions** tab of the connector, or passed along to the next connector in the flow. Files are automatically downloaded from the FTP server if **Download Automation** is enabled in the connector, and can be manually downloaded by clicking **Receive Files** button on the **Transactions** tab.

**Remote Path** should be set to the folder on the remote FTP server from which files should be downloaded. You can use [macros](#macros) to dynamically create dated folders (such as year or month folders). The application changes directories to the specified folder after logging in to the server. The **File Mask** property filters files so that only filenames matching the glob pattern are downloaded from the server. You can set a temporary download extension or prefix on the **Advanced** tab to ensure that files have been fully transferred before they end up in the **Transactions** tab.

You can use the **Delete files (after download)** setting to delete the files on the remote server after successfully downloading them.

After configuring, files are downloaded according to the **Receive Automation** settings, or by manually clicking **Receive Files** on the **Transactions** tab.

## Subfolder Headers

If **Recurse** is checked on the **Advanced** tab, when receiving a file from the **Remote Path** in the FTP connector:

* The message for the file that is received contains a Subfolder header in its metadata.
* This header contains the subfolder, relative to the **Remote Path** in the FTP connector, that the file was received from.
* This subfolder header is supported by other connectors that support a subfolder header in Send operations.

When sending files, if a Subfolder header is present on the message that is sent to the **Upload Path** in the FTP connector:

* The file is placed in the subfolder, relative to the **Upload Path** in the FTP connector, that is specified in the subfolder header.
* The subfolder is created if permissions are available.

## Macros

<MacrosTable />

### Examples

<MacrosExamples />
