| Visual Basic (Declaration) | |
|---|---|
Overloads Public Function MoveTo( _ ByVal destinationFolder As AbstractFolder, _ ByVal replaceExistingFiles As Boolean _ ) As FileSystemItem | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As FileSystemItem Dim destinationFolder As AbstractFolder Dim replaceExistingFiles As Boolean Dim value As FileSystemItem value = instance.MoveTo(destinationFolder, replaceExistingFiles) | |
| C# | |
|---|---|
public FileSystemItem MoveTo( AbstractFolder destinationFolder, bool replaceExistingFiles ) | |
Parameters
- destinationFolder
- An AbstractFolder object into which the item will be moved. Cannot be a null reference (Nothing in Visual Basic).
- replaceExistingFiles
- true if existing items in the destination should be replaced; false otherwise.
Return Value
A FileSystemItem object that represents the newly moved item.If the physical folder specified by destinationFolder does not exist, it is created.
If this FileSystemItem object represents a file, the physical file is immediately moved to the destination folder.
If it represents a folder, the folder and all it's content (files and subfolders) is immediately moved to the destination.
When replaceExistingFiles is true, any item in the destination that has the same name as an item being moved is automatically replaced.
When replaceExistingFiles is false, an exception is thrown whenever the destination contains an item with the same name as an item being moved.
FileSystemItem.ApplyPropertiesTo is called on the destination item; therefore, the attributes and dates of the original item are applied to the destination item.
Target Platforms: Windows 2000, Windows XP SP3 Family, Windows Server 2003-2008 Family, Windows Vista, Windows 7
Copy Code