Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
iliyansomlev
Partner - Creator II
Partner - Creator II

Can one load file info of .zip files in Qlikview directly?


Hi,

I have a list of zipped files that I don't want to read or load in Qlikview, but I want to load their file information - FileTime(), FileName(). Can this be done? At the moment I can't do it - I get blank document after reload. I access these files via ftp connection

Thanks!

7 Replies
sudeepkm
Specialist III
Specialist III

I do not think QlikView can read the file info from a zipped folder.

You may have to unzip and then reload the files just having filename(), filetime() like functions in your load script (if you do not want to load data from the files)

iliyansomlev
Partner - Creator II
Partner - Creator II
Author

I can't understand the logic of it - why should the file type prevent retrieval of meta-data like filetime and filename?

Is there a way to retrieve these metadata without unzipping the files?

sudeepkm
Specialist III
Specialist III

QlikView accepts specific formatted files (as shown below).

When you zip a folder that no longer is a folder it is a file and QlikView does not have facility to load zipped files.

I created a zip file for a folder named as drv containing three xlsx files. Then I tried to load the zipped file drv.zip using All Files from the files menu.

I saw that it accepts the file as fixed record or delimited.

I found that it also read only first file name into a column, I'm not sure why it did not read the other two file names.

T112084.png

iliyansomlev
Partner - Creator II
Partner - Creator II
Author

In my case we have normal (not zipped) directory IP/user01 and in it there are 20 zipped files whose metadata I want to load. I think that the problem is my use of wildcard (*) in the name of the files. I read somewhere on the forum that * doesn't work with ftp connection.

Unfortunately there is no logic in the naming of the files to do a cycle.

for each vFileName in Filelist(IP/user01) next vFileName  cycle also didn't work.

sudeepkm
Specialist III
Specialist III

maybe you have tried it before but just checking.

let vDataFolder = 'IP\DataSources\';

// Loop through each file under DataSource folder

for each vFiles in filelist('$(vDataFolder)*.zip')

LOAD FileName() as filename, FileTime() as filetime

                FROM [$(vFiles)](txt, codepage is 1252, no labels, delimiter is spaces, msq)

next

iliyansomlev
Partner - Creator II
Partner - Creator II
Author

Unfortunately it didn't work that way. We had to resort to executing external command from within QV script that connects to ftp and takes the info that we need, by storing it into a text file that later the script reads. No unzipping is necessary in this way to get the metadata.

Thank you for taking your time.

Not applicable

Hi,

First un zipped files , u can't load zipped Files Into qlikview. Select Table Files Then Select Which Fields u need Click on Finish . Reload (Ctr+R) save , declare the path then the data will Visible .

Regards,

Damu