LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

erase text file

Hello community,
 
I want to erase the content of a Text file that is already created.
I use the File dialog Box to open the file then the Repalce/or Create function and I write an emty data in the file and finaly I write the new data.
 
My final file include the new data after the existing data and don'r overwrite this data.
 
Thanks for any help
0 Kudos
Message 1 of 5
(2,893 Views)
Read the context help for Write to Text File carefully :



In your case, a file refnum is wired to the file (use dialog) input. Writing an empty string will not erase the content of the file but will write an empty string at the current file position, in other words : it will do nothing !
 
One easy solution is to remove Open/Create/Replace File and the first Write to Text File and then wire the path output of File Dialog to the remaining
Write to Text File. With a path wired to its input, it will replace the file contents like mentionned in the context help.

Message Edité par JB le 06-21-2007 10:49 AM

Message 2 of 5
(2,891 Views)

Thanks and sorry but I'm in Labview 8.0, this function is only available on 8.2.1, right?

Any other inputs?? Thanks

0 Kudos
Message 3 of 5
(2,888 Views)
In order to insert the picture into the text, I had to edit the message. Therefore, I guess that you have read it while it was not yet complete. Which function do you mean ?
Message 4 of 5
(2,883 Views)

Thanks issue solved. I just pass the folder path to the write in text file and it overwrite the previous content.

 

See you

0 Kudos
Message 5 of 5
(2,872 Views)