Move files between directories using WSO2 Enterprise Integrator

Krishni Andradi
WSO2 Solution Architecture Team Blog
2 min readNov 8, 2019

WSO2 File Connector — Move operation

WSO2 Enterprise Integrator is a fully open-source product that can be used to integrate/ connect any service, data source, application with one another.

WSO2 Enterprise Integrator comes with a set of connectors for popular business applications. So that those applications can be connected to WSO2 Enterprise Integrator and use that applications’ operations easily.

Those enterprise-ready connectors are stored in the WSO2 Connector store. WSO2 connector store provides these connectors free of charge and all the connectors, connector documentation, and connector source code is publicly available.

WSO2 File connector is a connector designed to connect to various file systems and perform various file operations such as search files, move files, read files and so on. This file connector uses apache commons VFS(Virtual File System) transport for processing.

In this use case, I want to transfer file from one location to another without reading the file.

In a previous article, I discussed file inbound proxy, where it reads file from a location, a process that file and move it to another location. But we cannot use the same for this use case, as it reads the file in order to process.

So to move a file without reading we can use WSO2 file connectors move operation.

As discussed in the “file connector — search operation” article, install WSO2 Integration studio, WSO2 Enterprise Integrator, install file connector to WSO2 Enterprise integrator and WSO2 Integration studio.

Also create a ESB solution project, REST API.

Drag and drop move file operation to the in the sequence of the REST API. Define its properties as follows.

For our use case, we only need to specify the source location and destination location.

Now build this project, deploy it and test it.

All the files in your source folder have moved to destination folder.

This article explains a part of a use case that I developed, If you want to view the full use case source code you can view it from the below link.

https://bitbucket.org/andradikla/ei_fileconnectordemo/src/master/

Thank You

--

--