Converting the FileSystemObject's MoveFile Method

Definition: Move one or more files to a different location.

MoveFile

See Move. You can use the Move-Item cmdlet to move more than one file, simply use wildcard characters to specify the files you want. Here’s an example that moves all files with a .jpg extension from the temp folder to the old folder:

Move-Item C:\temp\*.jpg C:\old

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