10-01-2018 08:03 AM
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.
Thanks
Mike
Solved! Go to Solution.
10-01-2018 08:33 AM
10-01-2018 10:53 AM
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.
mcduff
10-01-2018 05:07 PM
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 ...
Bob Schor
10-01-2018 05:18 PM
@Bob_Schor wrote:
Wow. I hadn't looked closely, but that's a really old function!
An oldie but a goodie, still works, and gives the OP the info they want.
mcduff
10-01-2018 07:07 PM
Unless he (or she) really does want the file creator (in Windows) ...
BS
10-01-2018 08:18 PM
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.
10-02-2018 05:56 AM
12-20-2018 06:35 AM
hi wiebe
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?
thanks.
12-20-2018 06:58 AM
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: