Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clearing a file

Status
Not open for further replies.

orisons

Programmer
Feb 18, 2002
49
CA
how can i clear the contents of a sequential file
I know this my sound basic but I am very new to this


 
There are several ways. Here's one of them.

Code:
    Dim iFile As Integer
    
    iFile = FreeFile
    
    Open "C:\FileToClear.txt" For Output As #iFile
    Close #iFile

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
As says to clear its contents orisons means (propably) to make the file have 0 bytes size and also to exist, not delete if (kill it). One good solution is given: {gmmastros}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top