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.
$$Filepath = ‘C:\FTP’
$$Filename = ‘PRODUCT_*.csv’ (i.e. PRODUCT_20150314.csv)
$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…!!!!