0
votes

The situation

  • I use Labview 2012 on Windows 7
  • my test result data is written in text files. First, information about the test is written in the file (product type, test type, test conditions etc) and after that the logged data is written each second.
  • All data files are stored in folders, sorted to date and the names of the files contain some info about the test
  • I have years worth of data files and my search function now only works on the file names (opening each file to look for search terms costs too much time)

The goal

  • To write metadata (additional properties like Word files can have) with the text files so that I can implement a search function to quickly find the file that I need

I found here the way to write/read metadata for images, but I need it for text files or something similar.

3

3 Answers

1
votes

You would need to be writing to data files that supports meta data to begin with (such as LabVIEW TDMS or datalog file formats). In a similar situation, I would simply use a separate file with the same name, but a different extension for example. Then you can index those file names, and if you want the data you just swap the meta data filename extension and you are good to go.

1
votes

I would not bother with files and use database for results logging. It may be not what you wiling to do, but this is the ultimate solution for the search problem and it open a lot of data analytics possibilities.

0
votes

The metadata in Word files is from a feature called "Alternative Data Streams" which is actually a function of NTFS. You can learn more about it here.

I can't say I've ever used this feature. I don't think there is a nice API for LabVIEW, but one could certainly be made. With some research you should be able to play around with this feature and see if it really makes finding files any easier. My understanding is that the data can be lost if transferred over the network or onto a non-NTFS thumbdrive.