01-20-2009 03:51 AM
Hello,
I would like to sort file names of files that have been saved chronologically instead of alphabetically.
I used the "List Folder" function which sorts the file names alphabetically. But I would like to have the possibility to sort the file names chronologically, that means from the oldest to the most recent one.
Can anybody help me for that?
Thank you in advance.
Solved! Go to Solution.
01-20-2009 04:33 AM
Hi Catty,
You can loop over the files and get each file's modification data using File/Directory Info. Then sort based on that.
Or you can use a system exec call (see attachment) and parse it's output.
Hope this helps,
Daniel
01-20-2009 04:46 AM
Hi catty,
attached you will find another solution for you.
Mike
01-20-2009 04:49 AM
MikeS81 wrote:Hi catty,
attached you will find another solution for you.
Mike
This is exactly what I meant in my first suggestion. Thanks for coding it 😉
01-21-2009 09:17 AM
Hello Daniel and Mike,
Thank you so much for your quick answer. You made me save a lot of time...
I used Mike's solution because I could not open Daniels one because I've got an older version of LabVIEW.
I really appreciate your help.
Have a nice day,
Catherine
01-21-2009 09:19 AM
Hi Catherine,
the attached image shows Daniels example.
Mike
01-21-2009 11:16 AM
Thanks Mike.
I would also use Mike's implementation.
01-22-2009 02:51 AM
Well, anyway, thanks to both of you for your time and your precious help! It works!
I started with LabVIEW a few month ago and it's not always easy to find rapidly a solution to what I want to do.
Thanks again, I won't hesitate to ask my future questions in this forum...
Best regards,
Catherine