You can't solve this on the Qlikview side. The server that hosts the files will either need to allow seeing the index of that folder, i.e. a list of all the files. Or it will need to host a file there that contains a list of all the files. In both cases Qlikview will then first need to get that list of files. Only then can it iterate through that list to retrieve all the files.
First load the file with the list of files into a table. Suppose you have file called fileslist.txt with this content:
You can load that data into a table called Files:
LOAD @1 as Filename FROM filelist.txt;
Then you can use a for next loop to iterate through the records of the table to retrieve each filename and then load the data from the files:
// create an empty table to which we can append all the data
Data: LOAD '' as SourceFile Autogenerate 0;
For i = 0 to NoOfRows('Files') - 1
LET vFileName = Peek('Filename', $(i), 'Files');
$(vFileName) as SourceFile
[http://myserver.com/$(vFileName)] (txt, delimiter is ',')
I have adapted the script for my context, but it doesn't work for me. May be because of my data come from xml files and not csv ?
Ok to create an empty table and loop :
The file containing list of the files to load is on the server too. I created a connection from file Web :
@1 as name
(txt, codepage is 28591, no labels, delimiter is spaces, msq);
'' as SourceFile Autogenerate 0;
For i = 0 to NoOfRows('files') - 1
LET vFileName = Peek('name', $(i), 'files');
/* CONCATENATE (tif_results)*/
$(vFileName) as SourceFile
[http://10.1.11.30/$(vFileName)] (txt, delimiter is ',')
When I try to load data from server (only for the moment), I get :
L'erreur suivante s'est produite:
This statement only works with lib:// paths in this script mode
Emplacement de l'erreur:
detail_cm_linux_postgresql_chrome.xml as SourceFile
[http://10.1.11.30/qualite/tpta/tests/tif/last/detail_cm_linux_postgresql_chrome.xml] (txt, delimiter is ',')
Qlik sense could not load data because of file on server is not a librairy file.
Ok, two problems. First of you're not using Qlikview although you posted this question in the Qlikview section. In Qlik Sense you can't reference files directly but you need to use a library connection. So you'll have to create such a library connection to one of the xml files. You can the reuse that to get the other xml files using the URL IS option to change the url dynamically. See the example on this page: https://help.qlik.com/en-US/sense/November2018/Subsystems/Hub/Content/Sense_Hub/DataSource/load-data...
And you can't load xml files as csv files. Create a load statement for a single xml file first you you know how to load the data from the xml files. Then use that load statement in the for next loop and change the bits that need to change, like the URL IS option.