- PowerShell Tutorial
- PowerShell - Home
- PowerShell - Overview
- PowerShell - Environment Setup
- PowerShell - Cmdlets
- PowerShell - Files and Folders
- PowerShell - Dates and Timers
- PowerShell - Files I/O
- PowerShell - Advanced Cmdlets
- PowerShell - Scripting
- PowerShell - Special Variables
- PowerShell - Operators
- PowerShell - Looping
- PowerShell - Conditions
- PowerShell - Array
- PowerShell - Hashtables
- PowerShell - Regex
- PowerShell - Backtick
- PowerShell - Brackets
- PowerShell - Alias
- PowerShell Useful Resources
- PowerShell - Quick Guide
- PowerShell - Useful Resources
- PowerShell - Discussion
Powershell - Rename File
Cmdlet
Rename-Item cmdlet is used to rename a File by passing the path of the file to be renamed and target name.
Example 1
In this example, we'll rename a folder D:\Temp\Test\test.txt to test1.txt
Type the following command in PowerShell ISE Console
Rename-Item D:\temp\Test\test.txt test1.txt
You can see the test.txt renamed to test1.txt in Windows explorer.
powershell_files_folders.htm
Advertisements