Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

prees959
Contributor II

Get File Details

Hello,

I have a file with the following naming convention :

DailyFileUpload_20171201011506.csv 

Is it possible to extract the following into a temp table ::

DailyFileUpload as filename

20171201 as filenamedate



many thanks


Phil

3 Replies

Re: Get File Details

use filename()

mid(subfield(filename(),'_',2),1,8)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.

Re: Get File Details

May be like this

LOAD SubField(FileBaseName(), '_', 1) as filename,

     Date#(Left(SubField(FileBaseName(), '_', 2), 8), 'YYYYMMDD') as filenamedate

     ...

From ....

Re: Get File Details

or left(subfield(filename(),'_',2),8)

Great dreamer's dreams never fulfilled, they are always transcended.