2 Replies Latest reply: Nov 21, 2013 4:29 AM by Rikab Kothari RSS

    for each file in filelist

      what does it mean " for each file in filelist" ? does it mean for each raw  of table in an excel file or for each tab? Thank you so much in advance.

        • for each file in filelist
          Stefan Wühl

          I believe neither one.


          It will actually iterate over files given in filelist, for example each excel file in a folder.


          See this example from HELP:


          // list all QV related files on disk

          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

          end sub

          call DoDir ('C:')


          Hope this helps,


            • Re: for each file in filelist
              Rikab Kothari

              Hi Swuehl,

              We are also using the similar code in one our application. But the issue with the above code is, it is generating huge log files(Log file is bigger than the application). If you can advice on how to optimize this code it would be really great. Please respond back in your convenient time.