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
FileSystem
Describes the My.Computer.FileSystem object and its members.CombinePath
Describes the CombinePath method.CopyDirectory
Describes the CopyDirectory method.CopyFile
Describes the CopyFile method.CreateDirectory
Describes the CreateDirectory method.DeleteDirectory
Describes the DeleteDirectory method.DeleteFile
Describes the DeleteFile method.GetParentPath
Describes the GetParentPath method.MoveDirectory
Describes the MoveDirectory method.MoveFile
Describes the MoveFile method.RenameDirectory
Describes the RenameDirectory method.RenameFile
Describes the RenameFile method.SpecialDirectories
Describes the SpecialDirectories object.
Related Sections
Reading from Files in Visual Basic
Lists tasks associated with reading from files.Writing to Files in Visual Basic
Lists tasks involving writing to files.File, Directory, and Drive Properties in Visual Basic
Lists tasks associated with getting and setting file, directory, and drive properties.