20 Replies Latest reply: Feb 18, 2016 11:13 AM by Friedrich Hofmann RSS

    Assembling a list of filenames

    Friedrich Hofmann



      I have made a copy of a directory on the server containing about 45.000 files, most in jpg format, some different and I want to run a script to loop over all these and just record the filename for once - I will go from there.

      For some reason, the code I have doesn't work - it looped over all the files, I could watch it in the progress_window - but I see only BLANKs in a listbox.

      The code is like this


      // Zunächst laden wir eine kleine Dummy-Tabelle
      FIRST 1
      ' '
      as Dateiname_alt
      RESIDENT Fin_Bew
      DIRECTORY 'C:\Users\friedrich.hofmann\Documents\QS_IdentBilder\Sicherungskopien_20160126\';
      FOR EACH File in FileList('*')
      Concatenate (Dateinamen)
      FIRST 1 LOAD '$(file)' as Dateiname_alt AutoGenerate 1;
      NEXT File
      STORE Dateinamen INTO 'C:\Users\friedrich.hofmann\Documents\QS_IdentBilder\Metadaten\Gesamtliste\Alle_alle.qvd';




      So I loaded a small dummy_file to concatenate to in each iteration of the loop - so I have one record too much, I can get rid of that lateron - and then I start the loop and for every file I encounter, I just want to load the file_name_and_path.


      Can anyone help me find out why this isn't working?


      Thanks a lot!

      Best regards,