Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
How to: Write Text to a File

How to: Write Text to a File

Updated: January 2010

The following code example shows how to write text to a text file.

It reads all the text flies, using a "*.txt" search pattern, from the user's documents folder and writes them into a large text file.


Visual Basic users may choose to use the methods and properties provided by the My.Computer.FileSystem object for file I/O. For more information, see My.Computer.FileSystem Object.

No code example is currently available or this language may not be supported.




January 2010

Improved example.

Customer feedback.

Community Additions

© 2015 Microsoft