- 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 - Move Folder
Cmdlet
Move-Item cmdlet is used to move a directory by passing the path of the directory to be moved and destination path where the folder is to be moved.
Example 1
In this example, we'll move a folder D:\Temp\Test to D:\Temp\Test1
Type the following command in PowerShell ISE Console
Move-Item D:\temp\Test D:\temp\Test1
You can see the Test directory moved to Test1 directory in Windows Explorer.
Example 2
In this example, Create a file test.txt in Test folder in D:\Temp\ and then run the same command.
Type the following command in PowerShell ISE Console
Move-Item D:\temp\Test D:\temp\Test1
You can see the content of Test1 directory in Windows Explorer where it contains both the Test directory and test file.
powershell_files_folders.htm
Advertisements