Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklearnervir
Creator
Creator

first need to check daily file before multiple file load

Hi,

I having following script where i need to check daily files present or not .if not than i need to set variable value and need to run other script of the qvw.

I have 5 files but not necessary these files should present daily.

vDate=Date(Today(),'YYMMDD');

let file1='C:\Users\test\Desktop\files\AF$(vDate).csv';

let file2='C:\Users\test\Desktop\files\DF$(vDate).csv';

let file3='C:\Users\test\Desktop\files\SF$(vDate).csv';

let file4='C:\Users\test\Desktop\files\TF$(vDate).csv';

let file5='C:\Users\test\Desktop\files\MF$(vDate).csv';

IF(FileSize($(file1))<>0 OR FileSize($(file2))<>0 OR FileSize($(file3))<>0 OR FileSize($(file4))<>0 OR FileSize($(file5))<>0) THEN

SET vElite='Y';

ELSE

SET vElite='N';

ENDIF

IF $(vElite)='Y' THEN

LOAD *

FROM

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

ENDIF

but this code is not working correctly.

i want a mechanism that first it should check that file available ...if available than load else set the variable so that we can perform any modfication.

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

i want a mechanism that first it should check that file available ...if available than load else set the variable so that we can perform any modfication.

  • Which file should be available? One or more of the five? Or all five? It now checks for one or more of the five, not all five.
  • Set what variable to what value?

talk is cheap, supply exceeds demand