06-30-2010 09:24 PM
Hello,
I have a file which has some characters written into it, I want to clear the file how can I do this?
Say I have word called "LabVIEW" , I need to clear this word and final result should be empty file.
or I need to replace the contents by writing "NI" into the file, but when I do this I still find other characters from LabVIEW word.
Thanks in advance
Solved! Go to Solution.
06-30-2010 10:11 PM - edited 06-30-2010 10:11 PM
07-01-2010 08:47 AM
Thanks,
But it does not work for me,
I tried this yesterday lot of times but was unsuccesful so posted here,
,
07-01-2010 09:03 AM
There is a difference between your method and mine. My method will move the EOF marker so that it gets placed after whatever I've written to the file, which in this case is the empty string. With your method the EOF marker is not moved. To perform the equivalent operation with your code you'd have to use the Set File Size right after the write function to set the file size to be the length of the string you wrote to the file. Or, you can just use the single function as I did.
07-01-2010 09:04 AM
Well this settings work for deleting the contents.
Closing this post
07-01-2010 09:08 AM
Hello smercurio_fc
Your post will definetely help me with all EOF, but I am not using EOF check etc etc, I will try what you said now, and penned down in my book,
Thanks,