Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Not reload when Folder is Empty

hello

I do a reload if my directory is not empty.

Does anyone have a solution for this?

thx

1 Reply
fosuzuki
Valued Contributor II

Re: Not reload when Folder is Empty

Hi,

you could use a for each loop to check if there are files in a folder. From the QV Help, a sample code:

SUB DoDir (Root)

    FOR Each Ext in 'qvw', 'qva', 'qvo', 'qvs'

        FOR Each File in filelist (Root&' \*.' &Ext)

            LOAD

                '$(File)' as Name,

                FileSize( '$(File)' ) as Size,

                FileTime( '$(File)' ) as FileTime

            autogenerate 1;

        NEXT File

    NEXT Ext

    FOR Each Dir in dirlist (Root&' \*' )

        call DoDir (Dir)

    NEXT Dir

ENDSUB

CALL DoDir ('C:')

Hope this helps you

Fernando

Community Browser