LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file already open

Hello,

Is there any mean to know if a txt file I want to write in is already open ?

Thanks,

Manu
0 Kudos
Message 1 of 5
(4,021 Views)
if you try to open a file and it is already open you will get an error saying that it is already open but if it is not already open then you will get no error and open the file
0 Kudos
Message 2 of 5
(4,010 Views)
with the caveat that the opening program locks the file.  Programs like notepad do not lock the file when they open them.

Paul
0 Kudos
Message 3 of 5
(4,006 Views)
that is true Pana man.
Etillol, are you making the program in labview. if you are then you can tell the new file function to deny read write then when you want to check if it is open you can try and open it
0 Kudos
Message 4 of 5
(4,002 Views)
If you want to do it programatically within LabVIEW, 7.1 has a "Access Rights" function.  In the great file I/O rejiggering of 8.0, the function "Get Permissions" took over that role.

Either one will output a permissions value indicating read, write, read/write.
0 Kudos
Message 5 of 5
(3,982 Views)