Working with Files in Visual Basic
No matter what development language and platform you use, at some point you will probably need to write code that interacts with underlying operating system files. For example, you might need to copy files or launch another program. You can do all this interactively by using Windows Explorer or an MS-DOS Prompt window. As you will see in this chapter, you can accomplish these same file operations easily by using Visual Basic code.
Another use for files is the storage and retrieval of information. In other chapters, you learned how to use databases to store information. However, sometimes the power of the Visual Basic database engine may not be necessary or even appropriate. For example, you may want to create a simple activity log or process a comma-delimited text file. In this chapter, you will examine a couple of options that allow you to store and access information in three types of text files: sequential files, random access files, and initialization (.INI) files.