Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a working FTP connection that allows me te read a files from an ftp server with qlikview ftp connector. The folder on the FTP server contains multiple csv files that i want to read. So i constructed 2 scripts with the following structures:
Table:
LOAD
Field1,
Field2,
Field3
FROM
ftp://username:password@11.222.3.44/Foldername/*.csv
(txt, codepage is 1252, embedded labels, delimiter is ';', msq);
for each File in filelist ('ftp://username:password@11.222.3.44/Foldername/*.csv')
Table:
LOAD
Field1,
Field2,
Field3
FROM
$(File)
(txt, codepage is 1252, embedded labels, delimiter is ';', msq);
next File
This doesnt work for FTP loads. QlikView says that the file '*' doesnt exist in both situations. However, these structures do work for local drive loads. Can anyone explain me why this isnt working and how I can make this work?
Try this :
for each File in filelist ('ftp://username:password@11.222.3.44/Foldername/*.csv')
Table:
LOAD
Field1,
Field2,
Field3
FROM
('ftp://username:password@11.222.3.44/Foldername/$(File)'
(txt, codepage is 1252, embedded labels, delimiter is ';', msq);
next File
Hi Ioannis,
Thanks for your reply.
I tried your code as follows:
for each File in filelist ('ftp://username:password@11.222.3.44/foldername/*.csv')
pakbon:
LOAD field1,
field2,
field3
FROM
'ftp://username:password@11.222.3.44/foldername/$(File)'
(txt, codepage is 1252, embedded labels, delimiter is ';', msq);
next File
It still doesnt work. It neither reports any errors. No load occurs. However I've checked that there are csv files.
Any suggestions?
Can I access the FTP server (at least one file) so that I can try?
Tjeerd
AFAIK the FTP protocol does not support wildcard matching. I think what you may need to do is create a .cmd or .bat file to pass an LS directory command to get the list of files and pipe this to a temporary text file.
In your script, execute the batch file and then loop over the temp file to get the FTP files. Google "ftp commands" or "ftp windows batch" for more information.
Hope that helps
Jonathan
Hi Tjeerd,
Did you able to load all the files from ftp? How could you able to load it?
Sorry didnt solve...
Regards,
Tjeerd
2014-02-24 20:18 GMT+01:00 Praveena Velagapudi <qcwebmaster@qlik.com>:
Qlik Community <http://community.qlik.com/> How to all files from
an FTP Folder?
reply from Praveena Velagapudi<http://community.qlik.com/people/praveenavelagapudi?et=watches.email.thread>in *App
Development* - View the full discussion<http://community.qlik.com/message/475146?et=watches.email.thread#475146>