- 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 Folder
Cmdlet
Rename-Item cmdlet is used to rename a folder by passing the path of the folder to be renamed and target name.
Example 1
In this example, we'll rename a folder D:\Temp\Test to D:\Temp\Test1
Type the following command in PowerShell ISE Console
Rename-Item "D:\temp\Test Test1"
You can see the Test directory as Test1 directory now. There should not be another folder with same name already in the temp directory otherwise PowerShell command will fail.
powershell_files_folders.htm
Advertisements
To Continue Learning Please Login
Login with Google