Provides properties and methods for working with drives, files, and directories.
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
The HostProtectionAttribute attribute applied to this type or member has the following Resources property value: Resources. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.
For more detailed information, see the Visual Basic topic My.Computer.FileSystem Object.
The following table lists examples of tasks involving the My.Computer.FileSystem object.
Read from a text file
Read from a delimited text file
Read from a fixed-width text file
Read from a text file with multiple formats
Read from a binary file
Read from text files in the MyDocuments directory
Read from a text file with a StreamReader
Write to a text file
Append to a text file
Write to a binary file
Write to text files in the MyDocuments directory
Write to a text file with a StreamWriter
Copy files with a specific pattern
Copy a file to the same directory
Copy a file to a different directory
Create a file
Delete a file
Delete all the files in a directory
Find files with a specific pattern
Move a file
Move a collection of files
Rename a file
Rename a directory
Copy a directory to another directory
Create a directory
Delete a directory
Find subdirectories with a specific pattern
Get the collection of files in a directory
Determine how many files are in a directory
Move a directory
Move the contents of a directory
Read from the MyDocuments directory
Parse a file path
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.