Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In my QlikView script, I want to load all pdf files with a Date Created date of today, and although is seems simple to do, I cannot seem to get anything working. Using these examples, can someone help with the code? Thanks.
My directory: \\NP\DemogData\
My Files all have different names...
Thanks.
Code like this should work (I've tested on my own items):
FOR EACH vFile in FileList('\\NP\DemogData\')
IF FileTime('$(vFile)') >= DAYSTART(NOW()) THEN
TRACE Load $(vFile);
ENDIF
NEXT
You might need to update the FileList statement to use the connection where your files are (in case I don't have it fully correct). You would then add your load statement inside of the IF/ENDIF where the TRACE is.
Code like this should work (I've tested on my own items):
FOR EACH vFile in FileList('\\NP\DemogData\')
IF FileTime('$(vFile)') >= DAYSTART(NOW()) THEN
TRACE Load $(vFile);
ENDIF
NEXT
You might need to update the FileList statement to use the connection where your files are (in case I don't have it fully correct). You would then add your load statement inside of the IF/ENDIF where the TRACE is.
Thanks a bunch! I was over complicating it... I was trying to write code that would only look at date for the loading and probably didn't have my loop logic correct either. Your code is simple and gets the job done, works great.