0 Replies Latest reply: Aug 31, 2016 2:31 PM by Sk Awal RSS

    Downloading multiple .xml.gz file from FTP

    Sk Awal

      Hi I am trying to get bunch of .xml.gz file from ftp and copying them to my local folder with the below script in qlikview. But its not working.

       

      If i want to copy files from one local folder to another local folder it works. But for ftp it doesnt work.

       

      BatFile:

      Load

      'This is a batch file test' As [@echo off]

      AutoGenerate(1);

       

      Let vDate = Date(Today(),'YYYY-MM-DD');

      Let vExt = '*.xml.gz';

       

       

      For Each vFile in FileList('ftp://Username:Password.982@ServerName:21/folder/*.xml.gz')

       

      BatFile:

      FIRST 1 Load

      'COPY $(vFile) C:\Users\Documents\TestFolder1\$(vDate)'&'_' & SubField('$(vFile)', '\', -1) As [@echo off]

      FROM $(vFile) (txt);

       

      Next

       

      Store BatFile into 'C:\Users\Documents\ABC'.bat (txt);

       

      Drop Table BatFile;

       

      EXECUTE C:\Users\Documents\ABC.bat;

       

       

      Let me know if you have any questions.

       

      Thnaks,

      Sk