IStorageFile.MoveAsync IStorageFile.MoveAsync IStorageFile.MoveAsync IStorageFile.MoveAsync IStorageFile.MoveAsync Method

Definition

Overloads

MoveAsync(IStorageFolder) MoveAsync(IStorageFolder) MoveAsync(IStorageFolder) MoveAsync(IStorageFolder) MoveAsync(IStorageFolder)

Moves the current file to the specified folder.

MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String)

Moves the current file to the specified folder and renames the file according to the desired name.

MoveAsync(IStorageFolder, String, NameCollisionOption) MoveAsync(IStorageFolder, String, NameCollisionOption) MoveAsync(IStorageFolder, String, NameCollisionOption) MoveAsync(IStorageFolder, String, NameCollisionOption) MoveAsync(IStorageFolder, String, NameCollisionOption)

Moves the current file to the specified folder and renames the file according to the desired name. This method also specifies what to do if a file with the same name already exists in the specified folder.

MoveAsync(IStorageFolder) MoveAsync(IStorageFolder) MoveAsync(IStorageFolder) MoveAsync(IStorageFolder) MoveAsync(IStorageFolder)

Moves the current file to the specified folder.

public : IAsyncAction MoveAsync(IStorageFolder destinationFolder)
IAsyncAction MoveAsync(IStorageFolder destinationFolder) const;
public IAsyncAction MoveAsync(IStorageFolder destinationFolder)
Public Function MoveAsync(destinationFolder As IStorageFolder) As IAsyncAction
Windows.Storage.IStorageFile.moveAsync(destinationFolder).done( /* Your success and error handlers */ );

Parameters

destinationFolder
IStorageFolder IStorageFolder IStorageFolder

The destination folder where the file is moved.

This destination folder must be a physical location. Otherwise, if the destination folder exists only in memory, like a file group, this method fails and throws an exception.

Returns

No object or value is returned by this method.

See also

MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String)

Moves the current file to the specified folder and renames the file according to the desired name.

public : IAsyncAction MoveAsync(IStorageFolder destinationFolder, Platform::String desiredNewName)
IAsyncAction MoveAsync(IStorageFolder destinationFolder, winrt::hstring desiredNewName) const;
public IAsyncAction MoveAsync(IStorageFolder destinationFolder, String desiredNewName)
Public Function MoveAsync(destinationFolder As IStorageFolder, desiredNewName As String) As IAsyncAction
Windows.Storage.IStorageFile.moveAsync(destinationFolder, desiredNewName).done( /* Your success and error handlers */ );

Parameters

destinationFolder
IStorageFolder IStorageFolder IStorageFolder

The destination folder where the file is moved.

This destination folder must be a physical location. Otherwise, if the destination folder exists only in memory, like a file group, this method fails and throws an exception.

desiredNewName
String String String

The desired name of the file after it is moved.

If there is an existing file in the destination folder that already has the specified desiredNewName, Windows generates a unique name for the file.

Returns

No object or value is returned by this method.

See also

MoveAsync(IStorageFolder, String, NameCollisionOption) MoveAsync(IStorageFolder, String, NameCollisionOption) MoveAsync(IStorageFolder, String, NameCollisionOption) MoveAsync(IStorageFolder, String, NameCollisionOption) MoveAsync(IStorageFolder, String, NameCollisionOption)

Moves the current file to the specified folder and renames the file according to the desired name. This method also specifies what to do if a file with the same name already exists in the specified folder.

public : IAsyncAction MoveAsync(IStorageFolder destinationFolder, Platform::String desiredNewName, NameCollisionOption option)
IAsyncAction MoveAsync(IStorageFolder destinationFolder, winrt::hstring desiredNewName, NameCollisionOption option) const;
public IAsyncAction MoveAsync(IStorageFolder destinationFolder, String desiredNewName, NameCollisionOption option)
Public Function MoveAsync(destinationFolder As IStorageFolder, desiredNewName As String, option As NameCollisionOption) As IAsyncAction
Windows.Storage.IStorageFile.moveAsync(destinationFolder, desiredNewName, option).done( /* Your success and error handlers */ );

Parameters

destinationFolder
IStorageFolder IStorageFolder IStorageFolder

The destination folder where the file is moved.

This destination folder must be a physical location. Otherwise, if the destination folder exists only in memory, like a file group, this method fails and throws an exception.

desiredNewName
String String String

The desired name of the file after it is moved.

If there is an existing file in the destination folder that already has the specified desiredNewName, the specified NameCollisionOption determines how Windows responds to the conflict.

option
NameCollisionOption NameCollisionOption NameCollisionOption

An enum value that determines how Windows responds if the desiredNewName is the same as the name of an existing file in the destination folder.

Returns

No object or value is returned by this method.

See also