cancel
Showing results for 
Search instead for 
Did you mean: 

Picking up the latest file from multiple files using file adapter

Former Member
0 Kudos

Hi,

I want to pick up the latest file (based on time stamp) among multiple files from a directory using sender file adapter...Can anyone suggest how to achieve this.Thanks in advance..

Sri.

Accepted Solutions (0)

Answers (4)

Answers (4)

gagandeep_batra
Active Contributor
0 Kudos

Hi Srini,

The following link might help you for picking latest files.

http://scn.sap.com/thread/3200887

Former Member
0 Kudos

Hello Srini,

Please go through below SDN blogs,it may be helpful to fulfill your requirement

http://scn.sap.com/thread/3214248

http://scn.sap.com/thread/1725145

Regards,

$HRI

Former Member
0 Kudos

Srinivas,

We had the similar requirement recently and used OS level script to pick the latest file.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

IMO, there is no standard file adapter configuration to pick the latest file. You can write a os level script and first move the existing files to different directory and then place the file on the directory. This is one approach. Second approach is  write a script and call this command after file processing in the file adapter. In this script after the file processing move the file to other directory.  This way you maintain only one file at this time. Take help from unix team to write the script.