Acquire File Created, Modified and Accessed Time Programmatically Using LabVIEW

Updated Mar 21, 2022

Reported In

Software

  • LabVIEW

Operating System

  • Windows

Issue Details

LabVIEW File/Directory Info function only returns the last modified date and time of a file. How to acquire the creation or last accessed time of a file as shown in the Windows's file properties box?

Solution

LabVIEW built-in File/Directory Info function only returns the last modified date. To get the creation date or last accessed date of a file, you will need to call FileInfo class in Windows's mscorlib.dll library and get the return value of CreationTimeUtc or LastAccessTimeUtc. Refer to the Related Links section for FileInfo class documentation.
 
Call FileInfo class snippet