How to move files from one folder in configuration to another using Command Line Interface Code processor

In Meiro Integrations output files or tables in the connector or processor components are saved in /data/out/tables or /data/out/files of the configuration and /data/in/tables or /data/in/files folder of the following configuration.

Learn more: about folder structure, please refer to this article.

For example, CSV files are saved by most of connectors and processors in /data/out/tables. This means that by default in the following configuration of the data flow, they will be located in /data/in/tables.

In some configurations though, you may need to move tables to another folder.

For example, the AWS S3 loader requires all files to be located in the folder /data/in/files.

The easiest way to move your files from a folder tables to a folder files is by using the mv command in Command Line Interface Code processor component:

#move all files from /data/in/tables to /data/out/files
mv in/tables/* out/files/

 It is possible to move only required files using wildcard or regular expressions:

#move .csv files from /data/in/tables to /data/out/files
mv in/tables/*.csv out/files/

If you want to move and rename a file:

#move .csv files from /data/in/tables to /data/out/tables
mv in/tables/test.csv out/files/newfile.csv