Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to load only the timestamps of all the files present in a folder without loading it's data?
LOAD DISTINCT
Filename() as Filename,
Filetime() as Filetime
FROM path\*.*;
Do you mean timestamp in filenames?
Hi Asma,
Below VB Script may be of help.
Function ShowFileAccessInfo(filespec)
Dim fso, a, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set a = fso.GetFile(filename)
msgbox f.DateLastModified
End Function
You can use this in macro and trigger as per requirement. Small change is required e.g. giving path of the file and so.
Thanks & Regards
Suhas Gupta
Yes timestamp of a file
Is the timestamp appended with the Filename?
You can use appropriate function to retrieve timestamp from filenames. What is the format of filenames?
LOAD SubField(FileName(),'_',2) As Ts
FROM
(ooxml, embedded labels, table is Sheet1) Where RecNo() < 2 ;
No, the file timestamp is not appended to the file name.
Then which file timestamp you need? Last modification timestamp?
Try something like this
LET vPath = Replace (DocumentPath (), '\' & DocumentName (), '')&'\QVDs';
trace $(vPath);
FOR Each File in filelist ('$(vPath)\*.*')
trace $(File);
fileTable:
LOAD '$(File)' as Name,
FileSize( '$(File)' ) as Size,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
TRACE folderpath-- $(vPath) . filename-- $(File);
NEXT File
Which was pasted from this thread
I have used filetime() function to get the filestamps of all the files present in the folder. But the problem is while loading the timestamp of all the files, it also loads the data present in those files. In the script execution box, i am able to see the number of lines fetched. How can i load timestamp without loading all the rows