cancel
Showing results for 
Search instead for 
Did you mean: 

Sender File Adapter - Dynamic Filename?

Former Member
0 Kudos

Dear All,

I have a simple requirement to retrieve a file named "XXX_ddmmyy" from an FTP site. The FTP site administrator will place a new file everyday. The date is part of the filename.

I can find a lot of information on how to set the Filename for a "Receiver File Adapter", but none about dynamically setting of the filename for a "Sender File Adapter".

Can you help please?

Kind Regards

Farshad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Is the file extension going to be the same each time ?

If so, use *.csv (if this is the extension) in the filename.

If there are any other parts that are common for each file that allow it to be picked up us them as well.

Cheers

Colin.

Former Member
0 Kudos

Reffer this blog--wirtten by Michal.

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

Thanks

Farooq.

*Rewards points if you find it useful*

Former Member
0 Kudos

Thx for the quick reply Colin.

Using wildcard will read the file that I want, but will also result in a lot of other files being read!!

I am looking for a way to read a specific file, whose name can be calculated.

Kind Regards

Farshad

Former Member
0 Kudos

Thank you Farooq,

Michal's blog explains how to <u>retrieve</u> the Filename after it is read by the "Sender File Adapter" and how to <u>set</u> the filename in the "Receiver File Adapter".

As I understood it, there is no explanation about setting the filename to be read in the first place.

Kind Regards

Farshad

Former Member
0 Kudos

Hi Fatin,

Check these weblogs ..may help you..

Dynamic File Name Part 1

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

Dynamic File Name Part 2

/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

Regards

Biplab

Former Member
0 Kudos

Hi Fatin,

Can't you use the exclusion details that can be set on the communication channel ?

Check the box "Advanced Selection for Source File" and this will give you the option to ensure it does not pick up any files you do not want picked up.

Cheers

Colin.

Former Member
0 Kudos

Thank you Biplab,

These blogs also discuss setting the file name in the "Receiver File Adapter". My problem is with the "Sender File Adapter". I can't find anything similar to "File Name Scheme" of the "Receiver File Adapter" available for the "Sender File Adapeter".

Kind Regards

Farshad

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You have mentioned over here that the requirement is to get the file "XXX_ddmmyy" from an FTP site.

Is that site strictly for keeping files related to your requirement only or lot of other files are also being placed???

If its strictly related to your requirement then you can use the filename "*.extension" and set the processing mode as "delete" so that once the File Adapter picks the file it will be automatically deleted.

But here disadvantage is that the file wont be no longer present in FTP site once it is picked by File adapter.

Thanks,

Lekshmi.

Former Member
0 Kudos

Dear All,

Thank you for your input. Really appreciate the support.

We are working with the FTP site administrator to have a "work around" solution (similar to what Lekshmi and Colin have suggested). Nevertheless, I am baffled that such a basic functionality for the file adapter seems to be missing for "Sender File Adapter".

Kind Regards

Farshad

Former Member
0 Kudos

You can give a try for this

in sender file adapter in give target directory

then in filename specify something like XXX*.xml(XXX = some common string in your filename) or simply you can write *.xml