Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

FTP into Qlikview

Dear all,

I have text files in the FTP link.I have loaded file by enable use FTP function.My files are

1) plant1_10_9_2017_fifo.txt

2) plant 2_23_10_2017_age.txt. vice versa.

we have 10 plants and  multi programs.The date is based on the transcation.How can i get plant and dates from this file.* function is not working in ftp.please give some other ideas.Its very urgent.

Thanks in advance.

7 Replies
Anil_Babu_Samineni

Could you please post the script where you tried..

And, I'd that files are stored as uncompressed? Because, using FTP connection May be zip files won't work

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anonymous
Not applicable
Author

My script is,

LET vDt = chr(39)& date(today(1),'DD_MM_YYYY') & chr(39);


SET Errormode =0;

For each i in 'plant1','plant3','SOU4_p1','SOU2_p1','SOU1_p1',,'plant5'

For each j in $(vDt)

Age:

Load *,

FROM

[ftp://quser:Ql%21cK@90.180.1.7/textfile/$(i)_$(j)_AGE_.txt]

(txt,codepage is 1252, no labels, delimiter is ';', msq);

Next j

Next i

The loop is not working.Also i am confused about the date .

jonathandienst
Partner - Champion III
Partner - Champion III

The FTP protocol does not support FileList() or wild card loads. This is an FTP limitation, not a Qlik thing.

You can extract a directory listing from the FTP site (eg to a text file) and then load and loop over the directory listing to load the files.

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

Dear jonathan,

I did to view ftp site in fie explorer manually,I am not aware of Extract a directory listing from the FTP site automatically.Could please help me

Thanks

jonathandienst
Partner - Champion III
Partner - Champion III

You'll need an external  batch file to run an FTP client, and send the command 'ls'. I can't remember the details, I last used FTP myself more than 5 years ago.

Google FTP for more information

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
srivastalans
Partner - Contributor III
Partner - Contributor III

Hi,

Try this code, using Batch File.,

Save your text files in your location from FTP server, then extract into Qlik.

**************************************************************

net use \\90.180.1.7\textfile 1234567 /USER:ABCDEF

copy /y "\\90.180.1.7\textfile\*.txt" "C:\New Folder"

**************************************************************

E.g.

FTP PATH  -  Location of your files (\\90.180.1.7\textfile)

PASSWORD  -  Provided Password (1234567)

USERNAME  -  Provided Username (ABCDEF)

DESTINATION PATH  -  C:\New Folder

Peter_Cammaert
Partner - Champion III
Partner - Champion III

An alternative method to Jonathan's suggestion could be to create an FTP script file with commands to transfer every file whose name starts with 'plant' and ends with '.txt' to a local directory.

I just found out that the ftp client on Windows Server 201x supports scripts files. I don't have an ftp server available to test this, but a possible script file would contain:

open IPAddress

user Username

pwd Password

lcd LocalDirectoryToReceiveFiles

cd RemoteDirectoryToGetFilesFrom

mget plant*.txt

quit

Replace all names in italics with proper values that work for you.

Launch a shell command via the script EXECUTE statement and include the script file after as parameter of a -s: command line option. Type ftp /? in a Command Prompt window to get more information about options.