cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Pick latest file based on timestamp

siddhesh_pathak4
Contributor
0 Kudos
482

Hello all,

Is there any way to pick the latest file from folder based on timestamp?

thanks for your help in advance.

Thanks,

Siddhesh

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Is requirement to pick the latest file only or pick all the files in the sequence (starting from the latest one) ?

1. If your requirement is to pick latest file only: then you can write a OS script in "Run Operating System command before processing" under Processing tab. This will make sure that you only pick the latest file.

2. If you have to read all the files in sequence: then you can use the option in sender file adapter called "Processing sequence set as By Date". FYI, In this mode file adapter will read the oldest file first

Edited by: Puneet Singhal on Mar 10, 2011 10:48 AM

siddhesh_pathak4
Contributor
0 Kudos

Hello all,

Thanks for your response.

I know we can write scripts or OS commands. But does anyone know what is the OS command or scripts for this, It will help alot.

Thanks,

Siddhesh

Former Member
0 Kudos

What is your OS of PI server ?

There are a lots of blogs, links, threads available to help you with this....however if u face any prb..let us know

Former Member
0 Kudos

hi friends .

my requirement is almost same .

can anyone let me know how to write the script .

or any FM available for the same .

Former Member
0 Kudos

Hi

There is an option of processing sequence in file adapter

you can select by date and it picks the first file which was created on the server.

Former Member
0 Kudos

Look at below