LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

find newest file in folder

Is there a way to only pull the newest (most current time stamp) file out of a folder?

Cheers!
0 Kudos
Message 1 of 4
(3,720 Views)
I think you have no choice but to check the last modification property (using the File/Directory Info primitive) for all the files (which you can get by using the List Directory primitive). You can then use Array Max and Min to find the newest file.

___________________
Try to take over the world!
Message 2 of 4
(3,712 Views)
Thank you for the quick reply!
0 Kudos
Message 3 of 4
(3,705 Views)

How about using System Exec.vi with dir/od as command line and check output to get your last modified file at provided directory ?

Maybe that's quicker than the other method... just guessing

Message 4 of 4
(3,699 Views)