5 Replies Latest reply: Jan 21, 2016 12:13 PM by Андрей Шепель RSS

    Load latest files from directory

    Андрей Шепель

      Good day!

      During working in script with loading xlsx files, i've met problem with reading only latest files.

       

      In script i have such block, which read files which have updating date=today()

       

      Directory;

       

       

      FOR Each File in filelist ('$(DataPath)Test_*.xlsx')

        Main_Temp:

       

      FROM

        '$(File)'

      (ooxml, embedded labels, table is Sheet1)

      Where date(FileTime( '$(File)' ))=Today();

      NEXT File;

       

      But this code read all files and get values from file which have updating date=today() and that's why time for this load is very long.

      Is there any way to modify this code to read only files with updating date=today()  ? (In my directory i have only one such file with one record and i think, time for it load must be very short)

       

      Thanks.