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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Special character in filename

Hello,

normally the following script provides files's size of the current folder and sub-folder.

The issue is that the size information is not provided as soon as the file contains a quote.

I tested many work around (by reading QlikView communty's discussions) without any success.

Linked question : is there a function in QlikView which disable 'special character' like it exists in another languages ?

Many thanks in advance,

Best regards

Gilles

Source code :

sub DoDir (Root)
   for each Fichier in filelist (Root&'\*')
    ALLFILES_T:
    Load '$(Fichier)' as file_name, 
         mid('$(Fichier)',1,Len('$(Fichier)')-Len( subfield('$(Fichier)', '\' ,-1))-1) as folder,
         mid(mid('$(Fichier)',1,Len('$(Fichier)')-Len( subfield('$(Fichier)', '\' ,-1))-1),1,index(mid('$(Fichier)',1,Len('$(Fichier)')-Len( subfield('$(Fichier)', '\' ,-1))-1) ,'\',-1) -1) as parent,
      FileSize('$(Fichier)') as file_size
        autogenerate (1);
   next Fichier
   for each Dir in dirlist (Root&'\*' )
    call DoDir (Dir)
   next Dir
end sub
 
//______________________________________________________________________________________


call DoDir('U:')

1 Reply
Not applicable
Author

Hello,

I still searching.

This brainstorm bring me another question : is there a way to use "expression patterns" in QlikView ?

Many thanks in advance for your help,

Regards,

Gilles