Simplify file transfer processes between FTP servers with Oracle Integration Cloud (OIC). Explore our meta guide for expert insights, step-by-step instructions, and best practices on leveraging Oracle OIC to seamlessly move files between FTP servers, optimizing your integration workflows and enhancing efficiency in data exchange. To transfer files between FTP servers in Oracle OIC, we typically use OIC FTP adapter in to connect to an FTP server and perform operations such as uploading files, downloading files, and managing directories. We will design a workflow in OIC to list files in source sFTP, read each file and move to target sFTP server/directory and archive the files. The high level flow is also shown below

Here is a step by step implementation of above workflow in OIC:
Create FTP Connection
Configure a connection in OIC by providing the FTP server details, such as host, port, username, password, and any other required connection properties. In our case, I will use the same sFTP server to move files between source and target directories.

Define FTP Integration
We will now create an integration to transfer files between ftp servers in Oracle OIC. We will use File Transfer integration style. Define integration name/package information and create. In canvas view, we will create 4 scheduled parameters as shown below. For more details on creating integration in OIC, refer to similar articles.

Configure FTP Adapter Operations
We will configure various operations here as per high process workflow above starting with list files operation. We have now created a list file operation and mapped it to the source directory and file name pattern parameters as shown below

Loop and Read Each File
We will create for each action and loop through source directory and read each file as mentioned below.

To read each file, we will introduce read file operation and map the directory and file name with for each action.

Map Move Files to Target Folder in Oracle OIC
Introduce write file operation to write files to target directory.

Map write file operations attributes as follows

Move Files to Archive Folder
As a last step, we need to archive the file. We will use move file operation and perform the mapping of source and target directory/file as follows

Activate and Test Integration
Set business identifier for tracking as per your requirement. Schedule and activate the integration to perform testing. Start the schedule with default parameters for source and target directories/files. The file will be copied to target directory and later moved from source folder to archive folder.
For more information OIC FTP adapter, please refer to https://docs.oracle.com/en/cloud/paas/integration-cloud/ftp-adapter/ftp-adapter-capabilities.html