Discussion Board for collaboration on QlikView Scripting.
I have a loop in a dir with FoundFile param which get's a full path with file name into it.
I try to get only the file name, but when I use:
let vTemp3 = filename('$(FoundFile)');
I get NULL in vTemp3.
but in this : let vTemp= '$(FoundFile)';
I get the correct path.
I tried to remove the single quotes, didn't help.
You might try something like below.
LET vTemp3 = SubField('$(FoundFile)', '\', -1);
Sub DoDir (Root)
For Each Ext In 'qvd' // filetype to search for in current directory
For Each File In FileList (Root & '\*.' & Ext)
Load '$(File)' as WayToFile,
FileTime('$(File)') as FileTime,
Replace(Mid('$(File)',Index('$(File)','\', SubStringCount('$(File)','\'))+1),'.$(Ext)','') AS FileName,
For Each Dir In DirList (Root & '\*') // searching in subdirs
Call DoDir (Dir)