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