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: 
Not applicable

filename() doesn't work

Hello at ALL,

in this case:

or each EXT in '*.qvd'
for each FILE in filelist('..\10' & EXT)
load
FileName("'$(FILE)'") as get_files
autogenerate 1;
next FILE

next EXT

the field get_files is empty. I checked the LOG and All is correct. Why?

the qvd file exists but the name do not appears. I tried to use

filesize() function and in this case the foreach work perfectly... why?

Thanks

Best Regards

4 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

Use single quotes around FILE and try that.

For each EXT in '*.qvd'
for each FILE in filelist('..\10\' & EXT)

f1:
load '$(FILE)' as get_files1 autogenerate 1;

f2:
load FileName('$(FILE)') as get_files2 autogenerate 1;

next FILE
next EXT

Check contents of get_files1 and get_files2.

Not applicable
Author

Many thanks,

please now the field contains all path but I just need a name of file.

Example:

the field get_field shows:

c:\path\path\myfile.qvd

I need to show in field just "myfile.qvd"

thanks

br

Slash

disqr_rm
Partner - Specialist III
Partner - Specialist III

You may use:

load subfield('$(FILE)' , '\', -1) as get_files autogenerate 1;

Not applicable
Author

Hi,

see also FILEBASENAME() and FILEEXTENSION() (QlikView Help)!

Good luck!

Rainer