Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Hi All,

I am facing issue using wait_for_file function, my requirement is in my source file path C:\FTP\PROD_20150314.csv  & PROD_20150314.csv two files having same name with different time factor. When I start  job want to take only one file that is latest one need to be process. How to set this option in wait_for_file function. currently I am using this pattern.

Substitution Param:

==================

$$Filepath = 'C:\FTP'

$$Filename = 'PRODUCT_*.csv'  (i.e. PRODUCT_20150314.csv)

Script:

=======

$PATH  ='[$$Filepath]';

$Filename = '[$$Filename]';

wait_for_file('[$PATH]'\\'[$Filename]', 0, 0, 1, $filestat);

$filestat = replace_substr($filestat,'/','\\');

What changes is required to get latest file from the path.

Thanks in Advance...!!!!

Regards,

Srini

2 Comments
Labels in this area