Skip to Content
author's profile photo Former Member
Former Member

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

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2011 at 05:42 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.