diff --git a/docs/visual-basic/developing-apps/programming/drives-directories-files/how-to-rename-a-file.md b/docs/visual-basic/developing-apps/programming/drives-directories-files/how-to-rename-a-file.md index 48d65fca60408..8310371fdbd3f 100644 --- a/docs/visual-basic/developing-apps/programming/drives-directories-files/how-to-rename-a-file.md +++ b/docs/visual-basic/developing-apps/programming/drives-directories-files/how-to-rename-a-file.md @@ -1,7 +1,7 @@ --- title: "How to: Rename a File" description: "Learn about how to rename a file with the Visual Basic Runtime Library or the .NET base class library." -ms.date: 07/20/2015 +ms.date: 01/14/2025 helpviewer_keywords: - "I/O [Visual Basic], renaming files" - "files [Visual Basic], renaming" @@ -17,7 +17,7 @@ The `System.IO.File` object doesn't contain a method to rename a file, instead, The following example renames the file located in the `My Documents` folder from `TextFile.txt` to `NewName.txt`. -:::code language="csharp" source="./snippets/how-to-rename-a-file/Form1.vb" id="BCLRename"::: +:::code language="vb" source="./snippets/how-to-rename-a-file/Form1.vb" id="BCLRename"::: ## Rename with the Visual Basic run-time @@ -25,7 +25,7 @@ Use the `RenameFile` method of the `My.Computer.FileSystem` object to rename a f The following example renames the file located in the `My Documents` folder from `TextFile.txt` to `NewName.txt`. -:::code language="csharp" source="./snippets/how-to-rename-a-file/Form1.vb" id="MyRename"::: +:::code language="vb" source="./snippets/how-to-rename-a-file/Form1.vb" id="MyRename"::: Visual Studio provides an IntelliSense code snippet that uses `My.Computer.FileSystem.RenameFile`. The snippet is located in **File system - Processing Drives, Folders, and Files**. For more information, see [Code Snippets](/visualstudio/ide/code-snippets).