Move Method

       
Move method as it applies to the WebFile and WebFolder objects.

Moves the specified object from its current location to a designated URL.

expression.Move(DestinationUrl, UpdateLinks, ForceOverwrite)

expression   An expression that returns one of the above objects.

DestinationUrl   Required String. The target URL, such as "C:\My Documents\My Webs\Adventure Works".

UpdateLinks   Required Boolean. Designate True if links are to be updated during the move process. Default is False.

ForceOverwrite   Required Boolean. Designate True if the object should be overwritten when a duplicate object is encountered. Default is False.

 

Move method as it applies to the NavigationNode object.

Moves a navigation node from one location to another in the navigation structure. Returns a NavigationNode object (the node after it has been moved).

expression.Move(NodeCollection, NewLeftSibling)

expression   An expression that returns a NavigationNode object.

NodeCollection   Required NavigationNodes. The target navigation collection.

NewLeftSibling   Optional Variant. The navigation node that will be the left sibling of the new node in the navigation structure. If it is not specified, the node will be moved to the rightmost end of the NodeCollection.

Example

As it applies to the WebFile object. 

The following statement moves a file from one position in the file structure to another .

myFile.Move("C:\My Documents\My Webs\Adventure Works\Images", _
    True, False)

As it applies to the NavigationNode object.

The following example moves a node from the fifth position in the navigation structure to the fourth position in the navigation structure by designating the third node as the new left sibling.

Private Sub MoveNavNode()
 Dim myNodes As NavigationNodes
 Dim myNode As NavigationNode

    Set myNodes = ActiveWeb.RootNavigationNode.Children
    Set myNode = myNodes(4)

    myNode.Move(myNodes,2)
    ActiveWeb.ApplyNavigationStructure

End Sub