Thanks for your reply.
Actually I have to load the file based on date in the filename not by file time its manual process.
I am looking for the solution in qliksense.
something like below . Please help me to pass max(date) instead of today()
LET vToday = date(today(), 'DDMMYYYY');
Sorry the Extract20180612 are the csv files in server.I have prepared sample structure in local desktop.
Business will update only 2columns in the csv file when changes required and they will place the latest one in the Extractions folder. Its not the daily process its depends on business change.
In the script based on latest file means max date file need to load dynamically. Please help me on this.
Thanks in advance.
Try like this
SUB DoDir (Root)
FOR Each File in FileList(Root&'\*.CSV')
LOAD '$(File)' as Name,
Date#(Right(SubField(SubField('$(File)', '/', -1), '.', 1), 8), 'YYYYMMDD') as Date
FOR Each Dir in DirList(Root&'\*' )
CALL DoDir (Dir)
CALL DoDir ('lib://MyData')
LOAD Date(Max(Date), 'YYYYMMDD') as MaxDate
vMax = Peek('MaxDate');
DROP Table Max, Table;
(txt, codepage is 28591, embedded labels, delimiter is ',', msq);