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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete a text file

Status
Not open for further replies.

vicky666

Programmer
Feb 13, 2003
22
0
0
GB
ok now i know this is simple but i cant remember it to save my life, How do you either delete all content of a text file or delete a text file and recreate an empty one in its place? sorry for the lack of knowledge




vix :)
 
you could use FSO.deletefile but theres probably an easier way that i cant remember!! If somethings hard to do, its not worth doing - Homer Simpson
 
I managed to figure it out just re-edited the file to remove the data, thanks for ya help though :)
 
You could try the following

FileHand = FreeFile
open "textfilepathname" for output as #FileHand
close #FileHand

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top