Knowledge Base Article

Home Page > Knowledge Base > Rapise

Home Page > Knowledge Base > Rapise > Rapise Desktop

Article Reading the Details of Files on the Windows File System

by Adam S on Tuesday, March 29, 2016

In the KB62 article - Accessing Files using Rapise we explain how to access the names, versions and locations of files on the Windows file system. One customer asked - can we verify any file details other than version. This article provides sample code for accessing other information.
The following function can be added to your Test.user.js file to add support for reading the meta-data for specific files in Windows Explorer. The example below shows the Path, Creation Date, Last Accessed Date and Last Modified Date
function ShowFileAccessInfo(filespec)
{
  
var fso, f, s;
  
fso = new ActiveXObject("Scripting.FileSystemObject");
  
f = fso.GetFile(filespec);
  
s = f.Path.toUpperCase() + "<br>";
  
s += "Created: " + f.DateCreated + "<br>";
  
s += "Last Accessed: " + f.DateLastAccessed + "<br>";
  
s += "Last Modified: " + f.DateLastModified  
   return(s);
}
Further Reading
To see what other attributes are available, please refer to the following article:
Attachments
Article Info
Last Updated: 3/29/2016
Article ID: KB202
# Views: 345
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.