Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Global File Time Overview

HI all,

Is there an easy way to retreive the file times of every QVD loaded into the data model? (but not with an individual treatment)

So that the user can see if some of the QVD are well refreshed.

I was thinking of a QV Component or something like that. !?!

Thanks for you help

3 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Use the filetime() function:

SourceTimes:

First 1

LOAD filename() as FileName , filetime() as FileTime FROM *.qvd (qvd);


talk is cheap, supply exceeds demand
Highlighted
Partner
Partner

thx Gysbert,

Useful but as you can assume, all my QVD are not in the same place 😕

So I should find a function that could list all my QVD path, store it into a table and find the file time of every QVD.

grtz

Highlighted
MVP & Luminary
MVP & Luminary

Perhaps something like this:

sub ScanFolder(Root)

    for each FileExtension in 'qvd'

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

            FileList:

            Load

            '$(FoundFile)'               as [FilenameWithPath],

            FileTime('$(FileExtension)') as [FileTime]

            Autogenerate(1);

        next FoundFile

    next FileExtension

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

  call ScanFolder(SubDirectory)

    next SubDirectory

end sub

Call ScanFolder('.') ;


talk is cheap, supply exceeds demand