LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Search a file directory and find the oldest file

I need to be able to search a file directory and find the oldest data file.  I will not know the date the file was made, but would like to search the file directory for the file that has been modified on the oldest date.
Thanks in advance to anyone that can offer some help.
0 Kudos
Message 1 of 8
(4,471 Views)
Try this in 7.0 format
Message 2 of 8
(4,463 Views)
Unclebump,
Thank you for that piece of code.  I could not find a few of the vis you used in your example in any of my labview directories.  Are those vis you have made or is there a tool set that I have not installed yet. 
Thanks again, it does appear that the piece of code you gave me will do the job.
Dusty
0 Kudos
Message 3 of 8
(4,460 Views)
This file will show you.
0 Kudos
Message 4 of 8
(4,450 Views)
Thanks,
That was it.
Dusty
0 Kudos
Message 5 of 8
(4,442 Views)

Wow, I have been looking for this function for almost 2 days and hacking awya at it for about a week! This is an awesome bit of code. I am acutally trying to sort to the most recent file (versus oldest), I've attached the code as follows. My problem that I am trying to figure out, however, is how to now strip away the date and time and leave the path, so I can drop it into another section of code and open/scan the file. I've tried a few array functions and bundling functions, but havnt been able to get it.

Do you have any suggestions on how to perform this operation?

I appreciate your help.

BR, SIg.

0 Kudos
Message 6 of 8
(4,194 Views)

How about a for loop and an unbundle by name?



Message Edited by Dennis Knutson on 01-07-2008 08:42 PM
Message 7 of 8
(4,189 Views)

Works like a champ! Thanks for the help.

Best Regards;

Sig.

0 Kudos
Message 8 of 8
(4,152 Views)