Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a list of text files in a folder that i want to convert to QVD's. Every week a new text file is added to the folder. How do i create a script to convert all files into QVD's
Below is the sample list of the current text files
Survey_Data_20180108
Survey_Data_20180101
Survey_Data_20171225
Survey_Data_20171218
Survey_Data_20171120
Survey_Data_20171106
Survey_Data_20171002
Survey_Data_20170926
Survey_Data_20170919
Kind regards,
Nayan
i did not tested this script. But this should help you to get started
FOR EACH file in filelist('D:\YOUR_PATH\*.txt') ;
tmp:
LOAD *
FROM $(file)
(txt, codepage is 1252, no labels, delimiter is '\t', msq);
let QVDPath = left('$(file)', len('$(file)')-3) & 'qvd';
Store * from tmp into '$(QVDPath)' (qvd);
NEXT file
Hi Tim
Thank you for your reply. I have applied your script, however I get the following error.
Kind regards
Nayan
try to add the trace command to see what happens
please Show me the result.
Probably there is something wrong with the path.
FOR EACH file in filelist('D:\YOUR_PATH\*.txt') ;
TRACE '$(file )';
tmp:
LOAD *
FROM $(file)
(txt, codepage is 1252, no labels, delimiter is '\t', msq);
let QVDPath = left('$(file)', len('$(file)')-3) & 'qvd';
Store * from tmp into '$(QVDPath)' (qvd);
NEXT file