cancel
Showing results for 
Search instead for 
Did you mean: 

FTP Adapter Sender: Dynamic configuration of directory

Former Member
0 Kudos

Hello all,

I need to read files from an FTP server.

The source directory contains the current date and hence changes everyday.

That means:

Today it's /home/user/out/20100519/ready/

Tomorrow it's gonna be /home/user/out/20100520/ready/

and so on.

Any idea how to set this up?

Thanks & regards

Rainer

Accepted Solutions (0)

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hello all,

>

> I need to read files from an FTP server.

> The source directory contains the current date and hence changes everyday.

>

> That means:

> Today it's /home/user/out/20100519/ready/

> Tomorrow it's gonna be /home/user/out/20100520/ready/

> and so on.

>

> Any idea how to set this up?

>

> Thanks & regards

> Rainer

/people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

using dynamicconfiguration cant you make the directory dynamic.

All you need is to have the current date as part of the string i.e /home/user/out/<YYYYMMDD>/ready/

Zilch
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks for your input.

I thought about using dynamic configuration, too. That would work fine for a receveiver adapter.

But in case of a sender adapter, I had to make a dynamic replacement before I have a message.

Hence: Before any mapping is executed.

How could I do that?

Best regards

Rainer

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>Any idea how to set this up?

yes

put all your file in one directory with this in the filename - 20100519_ready_

then in the filename in PI sender adapter you can specify a mask "ready"

so it will only pull the ready files

Regards,

Michal Krawczyk

Zilch
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Michal,

thanks for your response.

if changing the directory structure was possible, I wouldn't have posted this question.

But the structure is given and I have to cope with it. Somehow

Best regards

Rainer

Shabarish_Nair
Active Contributor
0 Kudos

my apologies on the earlier post.

I didnt notice it was for the sender adapter.

i guess as a standard feature the source folder cannot be dynamically changed.

Maybe a script can do the trick for you.