Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Wildcards in Filepath

Does anyone know how to use a wildcard in the file path (not the file name)?

Tags (1)
8 Replies

Wildcards in Filepath

Hi,

    Can you please tell us what wildcard you want to use.

    Please explain in detail with example.

Regards,

Kaushik Solanki

Or
Valued Contributor II

Wildcards in Filepath

If memory serves, this is only availble directly in the For each... next script syntax. If you look that up in the QV help, you should find an example.

Hope this helps,

Or

Not applicable

Wildcards in Filepath

I recieve flat files from our webanalytic system.

It places the files in a new folder - each time is sends a file over

For example


the file below was sent over on August 1, 2011 at 5 a.m.
\\webanalyticserver\2011-08-01 05.00.00\datafile.xlxs

the file below was sent over on August 2, 2011 at 6 a.m.
\\webanalyticserver\2011-08-02 06.00.00\datafile.xlxs


I can create a variable to populate the date however I cannot predict the time that the files will be created.
I would like to place a wildcard in place of the timestamp. To be specific, I'm trying to replace the 05.00.00 and the 06.00.00 with a wildcard.


I don't really care what kind of wildcard it is. It simply needs to take the place of the timestamp.
We can use wildcards on filenames however everything I read states that we cannot use wildcards on filepaths..

MVP
MVP

Re: Wildcards in Filepath

Hi

You should be able to use something like

\\webanalyticserver\2011-08-01*.qvd

This will load all the files that match the mask. QV will automatically loop over the files and concatenate the results.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

Re: Wildcards in Filepath

Thanks! I’ll give it a try

magavi_framsteg
Contributor III

Wildcards in Filepath

I'm not 100% sure if that works (I could be wrong here).

If it does work - all good.

If it does not work, try a for each next loop to iterate over all folders and files inside the folders and load the files you want with the standard load statement.

Wildcards in Filepath

Hi,

     Have a look at the below links, those are very helpful.

     http://community.qlik.com/docs/DOC-1306

     http://community.qlik.com/message/3752#3752   - Have a look at the attachment in this post.

    http://qlikviewmaven.blogspot.com/2008/09/loading-all-of-files-from-folder.html

Regards,

Kaushik Solanki

Not applicable

Wildcards in Filepath

thanks for the responses.

This question is not yet answered.  I can use a wildcard in the file name but cannot use wildcard in the file path. So my issue is with the file path NOT the file name.

thx