Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
bumin
Partner - Creator II
Partner - Creator II

check filename in an expression

I would like to check is a filename exists in a directory

depending on it I want to show the filename in a diagram

within the script I have found all JPG-Files

LET sDir = 'C:\Users\bumin\pictures\'; // Directory to look through

LET sFile = '*.JPG'; // Searchpattern

LET sSearchPattern = sDir & sFile;

// =================== Scan through directory and list all possible files

FOR EACH vFile in FileList (sSearchPattern)

FilesFound:

LOAD

'$(vFile)' AS FileFound

AUTOGENERATE 1;

NEXT vFile

now I want to check if a spcific filename does exists in FileFound

I have tried several functions but I didn' got it.

can someone help?

thanks

Bumin

1 Reply
bumin
Partner - Creator II
Partner - Creator II
Author

I have enterred the followinh fomula:

=Match(sDir&docnum&'.JPG',FileFound)

but then I get each record twice

Bumin