RTTSoftware Support Forum
PDF Explorer => General => Topic started by: Padanges on August 19, 2016, 11:05:09 AM
-
Hi,
in Eval expressions "CD" stands for Creation date, "MD" stands for Modification date, and "FD" stands for File date, but what exactly is the file date? Is it file access date? Is it file DB entry creation date? I need to have a separate entry for: file last Access Date, file DB Entry Creation Date, and file DB Entry Modification (for example, after Info Field edit) Date. Is there a way to get any of those parameters?
Thanks in advance
-
The PDFE file date field holds the file system file date modified property. The creation date and modification date fields are related to the PDFs internal metadata properties.
-
Is there a way to get file last Access Date, file DB (PDFe Entry) Creation Date, and file DB (PDFe Entry) Modification Date?
-
The modification date is already indexed in the DB (due to a bug in latest release, it is showing in GMT instead of local time), as it is used internally to know if the file needs to be reindexed.
The last accessed and creation dates are not currently indexed in the DB, and will not be until major DB code changes introduced. But these are file system properties, so, as workaround, you can use a script to fill custom fields with these.
-
Ok, then the file last Access Date should be something like this "return BatchFile.DateLastAccessed;" for the script, but it is not. Nor I was able to find any other expressions among sample scripts. Could you help with this?
-
Check the DateLastAccessed property of the FileSystemObject (https://msdn.microsoft.com/en-us/library/c8xh895w(v=vs.84).aspx)
function DateLastAccessed() {
var fso, f;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile(BatchFile.Filename);
return f.DateLastModified;
}
-
Thanks. The code works fine. Though, operating systems handle time stamping differently depending on the file system in use, therefore it's tricky to "audit" Access Date properly.
-
If you know the file system, you may take these differences into account.
https://msdn.microsoft.com/en-us/library/ch28h2s7(v=VS.85).aspx