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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can I use wildcards in path names for a LOAD statement?

Hi all,

I know I can use wildcards for filenames, as in (random example):

LOAD * FROM Employee_*_2011.xls;

But is it possible to use it in full paths? Example:

LOAD * FROM C:\Employees\YEAR_*\Employee_*.xls;

If not, is it possible to create a function for this?

Thanks a lot!

Andy

1 Solution

Accepted Solutions
Not applicable
Author

Hi.

You can use one loop in all directories. For example:

let Root = 'Path';

for each Dir in dirlist (Root&'\*')

for each File in filelist (Dir&'\*.xls')

Table:

Load X

FROM [$(File)] (biff, embedded labels, table is [Plan1$]);

next File

next Dir



Regards
Julian

View solution in original post

3 Replies
Not applicable
Author

Hi,

I think that just work in file name

Not applicable
Author

Hi.

You can use one loop in all directories. For example:

let Root = 'Path';

for each Dir in dirlist (Root&'\*')

for each File in filelist (Dir&'\*.xls')

Table:

Load X

FROM [$(File)] (biff, embedded labels, table is [Plan1$]);

next File

next Dir



Regards
Julian

Not applicable
Author

Hi Julian,

very cool. It works, just what I was looking for!

Best,

Andy