Discussion Board for collaboration on QlikView Scripting.
I am using the DirList/FileList expression to read the filenames from directories.
for each varFile in FileList(varDir&'\*.*')
subfield('$(varFile)','\',-1) as FileName
Is it possible to get in simple way the creation/change date for the files ?
Thanks for any help !
Go to Solution.
Check out filetime:
filetime( [ filename ] )
Returns a timestamp for the date and time of the last modification of the file filename. If no filename is specified, the function will refer to the currently read table file.
filetime( 'xyz.xls' )
Will return the timestamp of the last modification of the file xyz.xls.
Load *, filetime() as X from abc.txt ;
Will return the date and time of the last modification of the file (abc.txt) as a timestamp in field X in each record read.
Was not aware, that filetime([Ffilename]) works without opening the file in a load statement.
subfield('$(varFile)','\',-1) as FileName,
filetime('$(varFile)') as FileTimeStamp
Autogenerate (1) ;
works fine and gives the last change date. Any function known for creation date?
Any function known for creation date?
Hm, I don't think there is a QV function for that. You could probably try calling system functions e.g. by use of a macro: