Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

File Names

Hi All

Is there any way Qlikview can extract the Date Modified from the folder the Qlikview File is in as my client want's to have this shown in a report. This can not be run by a Macro.

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

You can use the FileTime() function to retrieve the modification date

View solution in original post

6 Replies
stigchel
Partner - Master
Partner - Master

You can use the FileTime() function to retrieve the modification date

stigchel
Partner - Master
Partner - Master

An example for a way to determine how many days ago the qvw was reloaded:

LET vDaysAgo = Now() - FileTime('MyQvw.qvw');

Not applicable
Author

Thanks Piet

Do you have a one line example as I have just tried that and I got nothing back.

its_anandrjs

Hi,

You can read the Filename() or FileBaseName() if the file name and the updated time mention in the file name. And then you can store it any table or variables as well as.

Regards

Anand

stigchel
Partner - Master
Partner - Master

That was an example, have you included the path to the file e.g. 'C:\MyDocuments\MyQvw.qvw' ?

Not applicable
Author

Hi, There is very good example in  QV help.

Se operator FOR EACH .. NEXT

Examples:

FOR Each a in 1,3,7,'xyz'

LOAD * FROM file$(a).csv;

NEXT

// list all QV related files on disk

SUB DoDir (Root)

FOR Each Ext in 'qvw', 'qva', 'qvo', 'qvs'

FOR Each File in filelist (Root&' \*.' &Ext)

LOAD

'$(File)' as Name,

FileSize( '$(File)' ) as Size,

FileTime( '$(File)' ) as FileTime

autogenerate 1;

NEXT File

NEXT Ext

FOR Each Dir in dirlist (Root&' \*' )

call DoDir (Dir)

NEXT Dir

ENDSUB

CALL DoDir ('C:')