Dela via


ItemCmdletProviderIntrinsics.Move Method

Definition

Overloads

Move(String, String)

Moves the item at the specified path to the specified destination.

Move(String[], String, Boolean, Boolean)

Moves the item at the specified path to the specified destination.

Move(String, String)

Moves the item at the specified path to the specified destination.

public:
 System::Collections::ObjectModel::Collection<System::Management::Automation::PSObject ^> ^ Move(System::String ^ path, System::String ^ destination);
public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> Move (string path, string destination);
member this.Move : string * string -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function Move (path As String, destination As String) As Collection(Of PSObject)

Parameters

path
String

The path to the item to move.

destination
String

The path to the location that the item will be moved.

Returns

The item(s) that were moved.

Exceptions

If path is null.

If destination resolves to multiple paths. or If destination and path don't resolve to the same provider. or If path resolves to multiple paths and destination is not a container.

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

If the provider threw an exception.

Applies to

Move(String[], String, Boolean, Boolean)

Moves the item at the specified path to the specified destination.

public:
 System::Collections::ObjectModel::Collection<System::Management::Automation::PSObject ^> ^ Move(cli::array <System::String ^> ^ path, System::String ^ destination, bool force, bool literalPath);
public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> Move (string[] path, string destination, bool force, bool literalPath);
member this.Move : string[] * string * bool * bool -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function Move (path As String(), destination As String, force As Boolean, literalPath As Boolean) As Collection(Of PSObject)

Parameters

path
String[]

The path(s) to the item to move.

destination
String

The path to the location that the item will be moved.

force
Boolean

Passed on to providers to force operations.

literalPath
Boolean

If true, globbing is not done on paths.

Returns

The item(s) that were moved.

Exceptions

If path is null.

If destination resolves to multiple paths. or If destination and path don't resolve to the same provider. or If path resolves to multiple paths and destination is not a container.

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

If the provider threw an exception.

Applies to