Get file name from SAP Data Services

2.3k Views Asked by At

I'm unable to read file name from data services which contain date_time format, I can read date but time can be variable, I've tried with *.csv on file name(s) property for flat file, but this for static file name.

Example: File_20180520_200003.csv, File_20180519_192503.csv, etc.

My script:

$Filename= 'File_'|| to_char(sysdate()-1, 'YYYYMMDD')|| '_'|| '*.csv';

I want to find a solution to read the 6 digits (any number) *.

1

There are 1 best solutions below

0
On

Finally, I've found a solution by using

$Csv = word(exec('cmd','dir /b [$Filename]*.csv',8),2) ;

on the flat file (file name property), I've added $Csv

It works fine.