Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
prees959
Creator II
Creator II

Load Script naming resident tables with FilePath

HI,

I'm using this load script to loop through a folder to load QVDs:

For each File in FileList ('..\..\QVD\*.qvd')

$(vTable):

LOAD

*

FROM

$(File)

(qvd);

Next File

But, when I look at the loaded tables each table has the full filepath as its name.  Eg , Sales.QVD has been loaded as :

'D:\Dev\Qlik\Apps\SalesForce\QVD\Sales'  where as I need the table loaded as 'Sales'

There are 5 more QVDs that I need to load from the QVD folder and the same is happening to each QVD.

Can anyone help?

Thanks!

Phil

1 Solution

Accepted Solutions
marcus_sommer

It looked that your variable vTable isn't valid and therefore qlik autogenerates the filename from the path. You could try the following:

For each File in FileList ('..\..\QVD\*.qvd')

let vTable = subfield(subfield('$(File)', '\', -1), '.', 1);

[$(vTable)]:

LOAD

*

FROM

$(File)

(qvd);

Next File

- Marcus

View solution in original post

2 Replies
marcus_sommer

It looked that your variable vTable isn't valid and therefore qlik autogenerates the filename from the path. You could try the following:

For each File in FileList ('..\..\QVD\*.qvd')

let vTable = subfield(subfield('$(File)', '\', -1), '.', 1);

[$(vTable)]:

LOAD

*

FROM

$(File)

(qvd);

Next File

- Marcus

prees959
Creator II
Creator II
Author

Perfect - thanks!