Powershell - Move File



Cmdlet

Move-Item cmdlet is used to move a file by passing the path of the file to be moved and destination path where the file is to be moved.

Example 1

In this example, we'll move a folder D:\Temp\Test\Test.txt to D:\Temp\Test1

Type the following command in PowerShell ISE Console

Move-Item D:\temp\Test\Test.txt D:\temp\Test1

You can see the Test.txt in Test1 directory now. Test.txt has been moved from Test to Test1.

powershell_files_folders.htm
Advertisements