cancel
Showing results for 
Search instead for 
Did you mean: 

How to: Sender File Adapter to dinamically read all subfolders of a folder

Former Member
0 Kudos

Here is the scenario:

-Interface: A file to file interface.

-Objective: The idea is to move files from a file server to another file server.

-Master Source Folder: ...\OUTPUT\

-Master Destination Folder: .....\INPUT\

Interface example

-Source Folder: ...\OUTPUT\INTERFACE1

-Destination Folder: .....\INPUT\INTERFACE1

The idea is that the PI interface must read all the subfolders inside ..\OUTPUT\ and then move the files found to the corresponding folder in the target.

What we want to achive is to be able to add a new source folder i.e ...\OUTPUT\INTERFACE2 without having to modify the sender File adapter.

Actual status: Dynamic determination of the destination folder is already done, but source folders are statically defined in the sender file adapter.

Can this be done? Perhaps using a Bean Module or something?

Regards.

Mariano Billinghurst.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try out the following, it might work out for your scenario.

1. In sender File Channels give the path as /* which means you are picking all the files under parent/child folders.

2. Set your adapter Adapter specific messages properties as explained in this [blog|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2664] [original link is broken] [original link is broken] [original link is broken];

3. Now with the help of variable substitution you can re created the same folder structure at receiver.

I hope it helps you

regards

Ramesh

Edited by: Ramesh P on Sep 7, 2011 11:15 PM