I'm looking for a way to access the details of a file in LabView. Specially I'm looking for the owner of a fil, date created and date modified. Any help is appreciated.
open a (Windows) command shell and type "dir /?": it lists several options to display the owner or the creation date.
Now all you need is to use SysExec with such a "dir" command and parse the result…
Here is one solution, if you want to install a toolkit. (Toolkit is free, BSD license)
Use the OpenG File Info VI, download the OpenG File Tools from VIPM.
Wow. I hadn't looked closely, but that's a really old function! The comment I found for Creator was "For Mac only", for example ... Still, OpenG does have things that I use quite a bit ...
I'll leave it to rolfk to chime in with a more elegant and knowledgeable response, but type and creator were mac only, I believe. The original MacOS up till version X did not have, nor need file extensions, the metadata type and creator took care of that. Below shows all of the information available from the VI.
I cannot import your snippet. (but it works with this one https://forums.ni.com/t5/LabVIEW/Simulation-is-not-running/m-p/3343124/highlight/true#M981978) why?
Can you please tell what .net constructor you used and maybe how you found the right one?
I'm not sure why that one works, and mine doesn't. I do know why mine doesn't . Lithium probably still removes the VI section from the PNG when saving the image. If you get the URL of the image, open it in a new tab, and then use you're browser to save it, I think it works. Not sure, but trickery like that used to work. See this. The other snippet's date of posting might be the reason. Not sure...
I think downloading the image as attachment works as well. See attachment .
Back to the topic...
FileInfo is in mscorlib.dll, System.IO. So browse to mscorlib, and look in System.IO.
If you google "FileInfo .NET", and go to the MSDN, it will mention this. I'm not saying "google it" as a smart sneer, but it isn't that obvious. I'm trying to teach how to catch a fish, instead of catching the fish for you. Can't resist it: