Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
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.
 
					
				
		
 stigchel
		
			stigchel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can use the FileTime() function to retrieve the modification date
 
					
				
		
 stigchel
		
			stigchel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can use the FileTime() function to retrieve the modification date
 
					
				
		
 stigchel
		
			stigchel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		An example for a way to determine how many days ago the qvw was reloaded:
LET vDaysAgo = Now() - FileTime('MyQvw.qvw');
 
					
				
		
Thanks Piet
Do you have a one line example as I have just tried that and I got nothing back.
 its_anandrjs
		
			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
		
			stigchel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		That was an example, have you included the path to the file e.g. 'C:\MyDocuments\MyQvw.qvw' ?
 
					
				
		
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:')
