Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
doespirito
Creator
Creator

how to load files from FTP with généric names like *.csv

hi every body,

i try to load several files from FTP all with csv extension.

il try to write this script, using generic names as *.csv,  but it dosen't work :

LOAD *

FROM

[MYFTPADRESS/MYFOLDER/*.csv]

//(txt, codepage is 932, no labels, delimiter is ' ', msq, no eof);

but it doesn't work,

Can anyone could help me,

Thank you very much

Arnault

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

The gist of it is that Qlik support for FTP connections doesn't usually understand wildcard characters. FTP itself has a standard command (called mget) to get multiple files with wildcard characters. But it seems that this is not the transfer method that Qlik supports.

The best thing you can do is transfer them file-by-file. Or transfer them in bulk outside of QlikView (as a preliminary stage under control of a supporting task for example), after which you can load all files locally and using the wildcards you prefer.

View solution in original post

12 Replies
sunny_talwar

What kind of error message you get when you try to do this?

doespirito
Creator
Creator
Author

hi Sunny, here is the message i get.

i 've read somewhere generics file don't work in ftp script.

I think i must write a script with a loop.

firts step will be to put in a table the name of each file in the directory (do you know how to do that ?)

then, open each file in the loop.

ftp error.PNG

sunny_talwar

Are you not seeing this error when loading a single file?

doespirito
Creator
Creator
Author

it works fine with with a single file

ftp error 2.PNG

sunny_talwar

Then you are right, you might need to use a for next loop

Loops in the Script

Also, look at the example 2 on this help page

For each..next ‒ QlikView

marcus_sommer

FTP doesn't support this type of access - you will always need a full path/file or a workaround with a batch: Re: Load new documents.

- Marcus

ed_hoecker
Creator III
Creator III

Hi,

I_m a beginner, but in my scripts I everytime write:

[./MYFTPADRESS/MYFOLDER/*.csv]


Marcus, please correct me if I'm wrong

marcus_sommer

With a normal windows file-system like FAT or NTFS you could use filefunctions and/or wildcards but not by accessing them per File Transfer Protocol – Wikipedia which is only a transfer-protocol.

- Marcus

Peter_Cammaert
Partner - Champion III
Partner - Champion III

The gist of it is that Qlik support for FTP connections doesn't usually understand wildcard characters. FTP itself has a standard command (called mget) to get multiple files with wildcard characters. But it seems that this is not the transfer method that Qlik supports.

The best thing you can do is transfer them file-by-file. Or transfer them in bulk outside of QlikView (as a preliminary stage under control of a supporting task for example), after which you can load all files locally and using the wildcards you prefer.