cancel
Showing results for 
Search instead for 
Did you mean: 

want to pick old files first (First In First Out mode)

Former Member
0 Kudos

Hi,

My scenario is File to Idoc Scenario getting multiple files in batch mode into source FTP server. But i want to pick which file has first loaded into ftp server that particular file only i want to process first.

my source file name doesn't contain any Timestamp value . but by considering the FTP server timings we have to pick the file.

From the source I'm getting files like ( Jain_1.xml , Jain_2.xml ,Jain_3.xml.... ect...) so in my sender adapater i have mentioned that file name as Jain.xml*

For picking earliest file suggest me some solution.

for this how can achive this. and what are the things we have to do.

Regards

Jain

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jain,

Use Jain*.xml instead. It will pick it in order.

jain* will substitue values for the * field and the appropriate files will be picked up.

Best Regards,

Kshitij

Former Member
0 Kudos

Dear Sharma,

Right now I'm using Jain*.xml only.. but my previous message some typing misteque it was displaying like that. But I have given Jain *.xml only . so it was picking files randomly . But for picking according to the files load time what we have to do.

Regards

Jain

Answers (5)

Answers (5)

0 Kudos

Have any body got the solution for this problem ?

I am also reading the files from a FTP folder using FTP adapter and having a problem of reading it in sequence.

I want the oldest file in that folder to be read first and in sequence thereafter.

Please suggest if there's any other ways/options to make this work. My scenario is FTP to Idoc .

varun_k
Contributor
0 Kudos

Hi Jain,

May I know what have you done to resolve your Issue. Can you please share with us, what settings you have made in order to process the first file in FTP server.

Regards,

Varun

0 Kudos

Has any body got the solution for thie problem ?

I am also reading the files from a FTP folder and having a problem of reading it in sequence.

I want the oldest file in that folder to be read first and in sequence thereafter.

Please suggest if there's any other ways/options to make this work

Thanks and Regards,

Amit Bhagwat

Former Member
0 Kudos

Any Suggestions please.

Former Member
0 Kudos

Hi Jain,

I havent exactly tried doing this one. I used file*.txt once but i didn't need it to pick in any order. My scenario had to pick all the files...

but i found this for you.....

EDIT :

Read the above link Jain. File adapter does not give a processing sequence for FTP protocol.

But it reads files in alphabetical order. So you have 2 choices.

1> Either use NFS to run your scenarios

2> Else rename your files to Jain_a.xml, Jain_b.xml, Jain_c.xml. This way they will be in alphabetical order and hence will be picked in the order you want.

If you want to rename your files dynamically at runtime. Look at the variable substitution concept.

That can be found here...

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

To learn more about it...just search with the string variable substitution in the forums and you will find answers.

Best Regards,

Kshitij

Edited by: Kshitij Sharma on Feb 3, 2009 9:12 AM

Former Member
0 Kudos

Hi Jain,

Found this for you.....this will definitely help..

Also Jain, just go to search option and search with the string "picking files in order". Im sure you will find a multitude of responses.

Best Regards,

Kshitij

Edited by: Kshitij Sharma on Feb 3, 2009 8:17 AM

Former Member
0 Kudos

Dear Sharma,

Thanks for your spontenious response. But as you suggested a option of Sequence of processing option was in only for NFS. but I'm getting the files in FTP server so, in My Communication Channel Transport Protocol is : FTP... not the NFS.

so, in the FTP case how can we do this...

Plesae suggest me..

Regards

jain