Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
Not applicable

List of files in a folder

Hi there

Is it possible to generate a list ex. in a straight table of files from a folder/subfolder on the drive?
If so how can i make this list?

Thanks

/Teis

1 Solution

Accepted Solutions

Re: List of files in a folder

Yes possible,

have a look at attached zip files.

Regards

ASHFAQ

View solution in original post

5 Replies
Partner
Partner

Re: List of files in a folder

here the scipt:

for each file in filelist('C:\Temp\*.*')

first 1 load

filename() as File

from '$(file)';

next

Regards

Not applicable

Re: List of files in a folder

       sub ScanFolder(Root)

          for each FileExtension in '*'

                    for each FoundFile in filelist( Root & '\*.' & FileExtension)

                              FileList:

                              LOAD '$(FoundFile)' as Name,

                              Filesize('$(FoundFile)') as Size,

                              QvdNoOfRecords ('$(FoundFile)') as NoOfRecords,

                              Filetime('$(FoundFile)') as Time

                            

       AUTOGENERATE 1;

                            

        

                    next FoundFile

          next FileExtension

          for each SubDirectory in dirlist( Root & '\*' )

                    call ScanFolder(SubDirectory)

          next SubDirectory

end sub

Call ScanFolder('D:\Qlik Path Name') ;

Replace the Path in the Call function to your install - the output of this will give you a straight table using these dimensions:

Name

Time

Size

NoOfRecords

MVP
MVP

Re: List of files in a folder

load

  FileName(),

  1

from 'c:\temp\*.*';

Re: List of files in a folder

Yes possible,

have a look at attached zip files.

Regards

ASHFAQ

View solution in original post

Re: List of files in a folder

Try this suggestion:

How to use regular expressions

Hope this helps.

Andrea