cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Lexicon
Level 3

How to compare times after calling GetFileInfo

Jump to solution

 

I am using the GetFileInfo function to get the time that a file was created. My code will compare the times that the files were created and will find out which file was most recently created.

Does anyone know of a way to compare the times of the files? For example here is how I find the time of the file
And an example of the times created for different files. 

GetFileInfo(FileName, FILE_DATE, nvResult, svResult)

Example of times returned:
"09:20:28"
"07:21:26"
"04:11:15"

 

 

Labels (1)
0 Kudos
(1) Solution
banna_k
Revenera
Revenera

Hi @Lexicon ,

 

There is no installscript builtin function to compare the file time, you can write your own logic to compare the times or you can import win32 API function to compare time like "CompareFileTime". 

View solution in original post

(1) Reply
banna_k
Revenera
Revenera

Hi @Lexicon ,

 

There is no installscript builtin function to compare the file time, you can write your own logic to compare the times or you can import win32 API function to compare time like "CompareFileTime".