cancel
Showing results for 
Search instead for 
Did you mean: 

Condition to pick the file from File adapter

vijay_kumar133
Active Participant
0 Kudos

Hi friends,

I have a requirement where i need to pick the file with few validations on the file name..

yyyy29042009_MAT09000500.csv

this is the file name format in the ftp server which i am having..

now i need to pick the file with date in the file name equal to current date and the highest number after MAT...

if a ftp has many files with same date stamp but i have to pick the latest one on that particular date..

And one more is once if it picked for one day it should not pick again for the same day..

rite now i am using this logic..

i used file name as yyyy.CSV

and archived the files to new folder..

Regards

Vijay

Accepted Solutions (1)

Accepted Solutions (1)

GabrielSagaya
Active Contributor
0 Kudos

Please refer those Run Operating System Command Blogs

/people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions

/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi

/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

vijay_kumar133
Active Participant
0 Kudos

Hi,

thanks a lot I will start the Os comand and let see.. if i come across any issue i will post again..

Regards

Vijay

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

only option would be to use a Script that will make sure only the required file after the validation is placed in a folder which XI can poll and pick.

As mentioned above you will ahve to use the OS commands or a script scheduled on your FTP server that will do the trick

prateek
Active Contributor
0 Kudos

For these conditions, you may run an OS command before the message processing to select out your required file. And then pick it up using file channel.

Control over communication channel could be handled using this

http://help.sap.com/saphelp_nwpi71/helpdata/en/45/0c86aab4d14dece10000000a11466f/content.htm

Regards,

Prateek