Creating, Deleting, and Moving Files and Directories in Visual Basic
This section lists tasks associated with creating, deleting, moving, and renaming files and directories in Visual Basic.
In This Section
- How to: Copy Files with a Specific Pattern to a Directory in Visual Basic
-
Demonstrates how to copy files with a specific file name pattern, such as only .txt files, to a directory.
- How to: Create a Copy of a File in the Same Directory in Visual Basic
-
Demonstrates how to create a copy of a file in the same directory.
- How to: Create a Copy of a File in a Different Directory in Visual Basic
-
Demonstrates how to copy a file to another directory.
- How to: Create a File in Visual Basic
-
Demonstrates how to create a file.
- How to: Delete a File in Visual Basic
-
Demonstrates how to delete a file.
- How to: Delete All Files in a Directory in Visual Basic
-
Demonstrates how to delete all the files in a specific directory.
- How to: Find Files with a Specific Pattern in Visual Basic
-
Demonstrates how to list only files with a specific file name pattern in a directory.
- How to: Move a File in Visual Basic
-
Demonstrates how to move a file to a different directory.
- How to: Move a Collection of Files in Visual Basic
-
Demonstrates how to move multiple files to a different directory.
- How to: Rename a File in Visual Basic
-
Demonstrates how to rename a file.
- How to: Rename a Directory in Visual Basic
-
Demonstrates how to rename a directory.
- How to: Copy a Directory to Another Directory in Visual Basic
-
Demonstrates how to copy a directory to another location.
- How to: Create a Directory in Visual Basic
-
Demonstrates how to create a directory.
- How to: Delete a Directory in Visual Basic
-
Demonstrates how to delete a directory.
- How to: Find Subdirectories with a Specific Pattern in Visual Basic
-
Demonstrates how to list directories with a specific pattern in their name.
- How to: Get the Collection of Files in a Directory in Visual Basic
-
Demonstrates how to list the files in a directory.
- How to: Determine How Many Files Are in a Directory in Visual Basic
-
Demonstrates how to determine how many files are in a directory.
- How to: Move a Directory in Visual Basic
-
Demonstrates how to move a directory.
- How to: Move the Contents of a Directory in Visual Basic
-
Demonstrates how to move the contents of a directory.
- How to: Retrieve the Contents of the My Documents Directory in Visual Basic
-
Demonstrates how to read from special directories.
- How to: Parse File Paths in Visual Basic
-
Demonstrates how to use My methods to combine file paths.
Reference
- My.Computer.FileSystem Object
-
Describes the My.Computer.FileSystem object and its members.
- My.Computer.FileSystem.CombinePath Method
-
Describes the CombinePath method.
- My.Computer.FileSystem.CopyDirectory Method
-
Describes the CopyDirectory method.
- My.Computer.FileSystem.CopyFile Method
-
Describes the CopyFile method.
- My.Computer.FileSystem.CreateDirectory Method
-
Describes the CreateDirectory method.
- My.Computer.FileSystem.DeleteDirectory Method
-
Describes the DeleteDirectory method.
- My.Computer.FileSystem.DeleteFile Method
-
Describes the DeleteFile method.
- My.Computer.FileSystem.GetParentPath Method
-
Describes the GetParentPath method.
- My.Computer.FileSystem.MoveDirectory Method
-
Describes the MoveDirectory method.
- My.Computer.FileSystem.MoveFile Method
-
Describes the MoveFile method.
- My.Computer.FileSystem.RenameDirectory Method
-
Describes the RenameDirectory method.
- My.Computer.FileSystem.RenameFile Method
-
Describes the RenameFile method.
- My.Computer.FileSystem.SpecialDirectories Object
-
Describes the SpecialDirectories object.