How to erase the content of a file without closing and opening it again
As far as I am aware, every way to erase the contents of a file on NT involves, either directly or indirectly, opening it in overwrite mode, writing nothing, and closing. If you already had the file open, that will mean closing and opening again.
update: Unless you want to just delete the file. That will also have the side-effect of erasing its contents. If that's what you want, Perl's unlink command will do it for you.
In reply to Re: How to erase the file content
by jonadab
in thread How to erase the file content
by kamesh3183
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |