07-26-2018 09:25 AM
Hi there,
We use TDMS files in several applications, and need some way to distinguish what application a data file came from. One idea is to just use a different extension for the file, such as .App1data and .App2data (names of course TBD), whilst maintaining the TDMS file format.
Does anyone forsee any issues with doing this? Or perhaps you have done it yourself? Other than Windows not recognising the file to open in excel which isn't important.
Thanks,
Ian
07-26-2018 09:29 AM
no problems,
other than you choose an extension that is already 'mapped' to a program and the program trying to open it crashes, but that is unlikely
regards
07-27-2018 02:42 AM
Should be fine, except for Windows reacting a bit annoying when trying to open it.
But I still believe it's easier to put it in the filename like _app1data instead of using the file extension.
Andreas
07-27-2018 06:10 AM
Hey Ian,
One main thing to conciser is that if you are attempting to change the file extension programatically as seen in this snippet:
The actual file saved on path will be 'Example.RandomExtention.tdms' - keep this in mind.
I would recommend using a ' - ' as a deliminator to essentially add attributes to your file name.
If you're browsing this yourself in windows then you many want your application name first so you can quickly sort/type on the keyboard to search for it.
07-27-2018 06:58 AM
I would typically add descriptor text using a delimiter such as hyphen, underscore, or period. At least under semi-modern versions of Windows, file and folder names can have multiple period characters -- only the very last one is considered to denote the file extension. In other words, a file name like "App1.StressTest.LowVoltage.tdms" would be handled just as cleanly as "App1_StressTest_LowVoltage.tdms". If you filter your file dialog for tdms files, both would show up.
-Kevin P