Converting the FileSystemObject's Move Method


Windows PowerShell


Definition: Move a file or folder to a different location.

Move


You can use the Move-Item cmdlet to move files and folders to new locations. Simply call Move-Item followed by the source file or folder and the new destination. Here are examples of each.

Move a file:


Move-Item C:\temp\test.txt C:\old


Move a folder:


Move-Item C:\temp C:\old


See conversions of other FileSystemObject methods and properties.
Return to the VBScript to Windows PowerShell home page

Show: