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: 
sujit_nath
Creator III
Creator III

How to get date and time stamp of file in a location

I have a location suppose c/files/

Here I have 4 files namely a.csv, b.csv, c.csv and d.csv

I want to check the time and date of the files in the drive and proceed the script only if the file has changed.

How do I check that?

The logic would be:

read file date and timestamp,

if file has changed, read the file, otherwise skip script execution.

Could someone suggest me an approach for that please.

Thanks

Sujit!

Labels (1)
3 Replies
Colin-Albert
Partner - Champion
Partner - Champion

Use the filetime function in the load script.             filetime(filename)

File Functions
https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/FileFunctions/...

sujit_nath
Creator III
Creator III
Author

For a big file, it takes lot of time. It actually reads all rows then returns time which is not as expected.

Is there a faster way to get the time?

Thanks!!

sujit_nath
Creator III
Creator III
Author

Also I can use a variable to see the filetime, but how do I store it in a file that can be read to check if the file has changed or not.

Thanks!!