5 Replies Latest reply: Sep 3, 2015 2:31 PM by Massimo Grossi RSS

    Load and concatenate all files in a folder

    Yvonne Han

      Hi

       

      I'm trying to load and concatenate all .csv files in a folder. Below is  my script but it didn't load any data. Any idea why?

       

      -------------------------------------------------------

       

      Let path = 'H:\SPC\QV File folder\*.csv';

       

      for each file in FileList(Path)

       

      Data:

      Load

      *

      from $(file)

      (txt, utf8, no labels, delimiter is ' ', msq, header is 6 lines);

       

      Next file

        • Re: Load and concatenate all files in a folder
          Clever Anjos

          Would you mind posting your log file?

          Please enable it at Document Properties / General / tick Generate log file

            • Re: Load and concatenate all files in a folder
              Yvonne Han

              This is in the log file. Any hint?

               

              9/3/2015 2:22:04 PM:      UserLogfileCharset            1200

              9/3/2015 2:22:04 PM:      OdbcLoginTimeout              -1

              9/3/2015 2:22:04 PM:      OdbcConnectionTimeout         -1

              9/3/2015 2:22:04 PM:      ScriptWantsDbWrite            false

              9/3/2015 2:22:04 PM:      ScriptWantsExe                false

              9/3/2015 2:22:04 PM:      LogFile CodePage Used:        1200

              9/3/2015 2:22:04 PM:       Reload Executed By NAEAST\e779672

              9/3/2015 2:22:04 PM:       Process Executing: QlikView Desktop

              9/3/2015 2:22:04 PM:       Process ID: 8224

              9/3/2015 2:22:04 PM: 0002  SET ThousandSep=','

              9/3/2015 2:22:04 PM: 0003  SET DecimalSep='.'

              9/3/2015 2:22:04 PM: 0004  SET MoneyThousandSep=','

              9/3/2015 2:22:04 PM: 0005  SET MoneyDecimalSep='.'

              9/3/2015 2:22:04 PM: 0006  SET MoneyFormat='$#,##0.00;($#,##0.00)'

              9/3/2015 2:22:04 PM: 0007  SET TimeFormat='h:mm:ss TT'

              9/3/2015 2:22:04 PM: 0008  SET DateFormat='M/D/YYYY'

              9/3/2015 2:22:04 PM: 0009  SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT'

              9/3/2015 2:22:04 PM: 0010  SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec'

              9/3/2015 2:22:04 PM: 0011  SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun'

              9/3/2015 2:22:04 PM: 0038  Let Path = 'H:\SPC\QV File folder\*.csv'

              9/3/2015 2:22:04 PM: 0042  for each file in FileList('H:\SPC\QV File folder\*.csv')

              9/3/2015 2:22:04 PM: 0065  exit script

              9/3/2015 2:22:04 PM:      Execution finished.

            • Re: Load and concatenate all files in a folder
              Massimo Grossi

              Let Path = 'H:\SPC\QV File folder\*.csv';

               

              for each file in FileList('$(Path)')

               

                   trace $(file);

               

                   Data:

                   Load

                        *

                   from $(file)

                   (txt, utf8, no labels, delimiter is ' ', msq, header is 6 lines);

               

              Next file