Manipulating the File System Using VB

Windows Explorer represents the contents of your hard drive graphically using file and folder icons. Many of the actions that you perform in Explorer (such as copying or renaming files) also can be accomplished in Visual Basic .NET via the System.IO namespace. The System assembly should be automatically referenced in your project, so you just need to add the following Imports statement at the top of your form or module:

Imports System.IO 

The most useful classes for performing file operations are

  • FileSystemInfo— The FileSystemInfo class represents an entry in the file system, whether it is a file or a folder. You cannot create an instance of a FileSystemInfo object with the New keyword but, as you will ...

Get Special Edition Using Microsoft® Visual Basic® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.