Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
alwinsch
Creator
Creator

Load script - file list

Hi all,

I want to load all filenames in temptable and use them for another script.

I have a very simple syntax

 

TEMP_FILE:

LOAD

FileBaseName() as "filename",

FileTime() as "Date_file"

FROM

;

There  should be 57 records in the table.

But it shows only 3.

What am i doing wrong?

Thanks,

A.

1 Solution

Accepted Solutions
flipside
Specialist II
Specialist II

Okay, try this code instead if you just want the file names (this will return hidden files also) ...

For each file in FileList('C:\Users\alwinsc\Documents\QlikView\ProdStat\*')

    TEMP_FILE:

    LOAD

        subfield('$(file)','\',-1) as filename,

        FileTime('$(file)') as Date_file autogenerate 1;

Next;

Your filename will have the extension, but if you don't need it just wrap around another subfield statement with '.' delimiter.

flipside

View solution in original post

5 Replies
its_anandrjs

Hi,

From my side script runs correctley please check once from your end.

Reagrds,

Anand

alwinsch
Creator
Creator
Author

No it does not work.

I get 2 filenames and i need some around 60.

flipside
Specialist II
Specialist II

Are the files set to hidden? These won't show.

flipside

alwinsch
Creator
Creator
Author

No the folder and files are not hidden.

But when i create a new table i get some strange dimensions.

(please see attachment)

A.

Strange_icons.png

flipside
Specialist II
Specialist II

Okay, try this code instead if you just want the file names (this will return hidden files also) ...

For each file in FileList('C:\Users\alwinsc\Documents\QlikView\ProdStat\*')

    TEMP_FILE:

    LOAD

        subfield('$(file)','\',-1) as filename,

        FileTime('$(file)') as Date_file autogenerate 1;

Next;

Your filename will have the extension, but if you don't need it just wrap around another subfield statement with '.' delimiter.

flipside

View solution in original post