07-22-2024 11:38 PM - edited 07-23-2024 12:01 AM
My code is creating log files in specific folder Report every time I run the code and text files are named in the format: %d %m %y____%H %M %S.txt. For Example: 09 07 24____14 50 03.txt.
I want to extract some text from the latest generated text file and display it on front panel. I am using List Folder.vi to extract the names of every text file in the folder. How can I proceed further. Kindly guide me. I am Using LabView 2017.
Solved! Go to Solution.
07-23-2024 12:58 AM - edited 07-23-2024 12:59 AM
Hi qureshi,
@qureshi000 wrote:
My code is creating log files in specific folder Report every time I run the code and text files are named in the format: %d %m %y____%H %M %S.txt. For Example: 09 07 24____14 50 03.txt.
I recommend to change the filename formatting to %Y%m%d_%H%M%S (without spaces, year before month before day): it helps when sorting the files…
@qureshi000 wrote:
I want to extract some text from the latest generated text file and display it on front panel. I am using List Folder.vi to extract the names of every text file in the folder. How can I proceed further. Kindly guide me.
Once you got the array of filenames you can convert their filename back to a timestamp and search for the latest timestamp: you KNOW the filename formatting!
(If you would follow my suggestion for filename formatting you could even sort the array of filenames and pick the first or last element after sorting…)
07-23-2024 01:05 AM
Once you got the array of filenames you can convert their filename back to a timestamp and search for the latest timestamp: you KNOW the filename formatting!
(If you would follow my suggestion for filename formatting you could even sort the array of filenames and pick the first or last element after sorting…)
Kindly explain it by implementing it in LabView.
07-23-2024 03:04 AM
Hi qureshi,
@qureshi000 wrote:
Kindly explain it by implementing it in LabView.