3 Replies Latest reply: Mar 17, 2015 5:48 AM by Gysbert Wassenaar RSS

    Global File Time Overview

    Thierry Theyskens

      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

        • Re: Global File Time Overview
          Gysbert Wassenaar

          Use the filetime() function:

           

          SourceTimes:

          First 1

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

            • Re: Global File Time Overview
              Thierry Theyskens

              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

                • Re: Global File Time Overview
                  Gysbert Wassenaar

                  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('.') ;