LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programmatically change attributes of a data file

The application (vi) writes to a data file whenever the data changes. Other users want to be able to view the data file from time to time. The problem is that when the data file is opened by the other users, the vi is unable to write to the file. Is there a way to programmatically set the file attribute of the data file to "read only"? This would make the "client" computer open the file as a copy thus allowing the "host" computer to maintain full control. The vi could change the file attribute to "read/write" make the change the change the attribute back to "read only".

Thanks!
0 Kudos
Message 1 of 2
(2,896 Views)
You can programmatically change the properties of a file using the LabVIEW Access Rights VI and there is a document on DevZone along with an example of making a file read-only".

Follow this link to get to the document:

http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/254d6ca3b06fa8da86256953004bb814?OpenDocument

Hope this is of use
Jeremy
Message 2 of 2
(2,896 Views)