Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

session

Hi All,

there are many audit files as shown in the figure

Auditlogs.PNG

for different dates which  cannot be taken individually ,

therefore i am writing the below script  please , let me know if this is the correct way to access the files ,

scirptaudit.PNG

?

Thanks in advance

2 Replies
qlikviewwizard
Master II
Master II

It is correct way.

You can restrict the data to load between dates also.

For example, you wanted load today's date and 3 more previous dates.

You can achive like this:

Capture.PNG

Capture.PNG

balabhaskarqlik

May be try like this:

for each vFile in FileList('..\Data\*.txt')

     let vQVD = replace(vFile, '.txt', '.qvd');

     if alt(FileSize('$(vQVD)'), 0) = 0 then

          NextFile:

          LOAD

              *

          FROM $(vFile)

          (txt, utf8, embedded labels, delimeter is '\t', msq);

          STORE NextFile INTO [path$(vQVD)]. (qvd);

          DROP TABLE NextFile;

     end if

next

Data:

LOAD

    *

FROM ..\Data\*.qvd (qvd);